CPU USAGE AFTER UPGRADING - Page 2 CPU USAGE AFTER UPGRADING - Page 2
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

CPU USAGE AFTER UPGRADING

Started by JohannM, September 04, 2008, 05:32:14 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

JohannM

I do not have that much pictures on my e.g. 2008 system, as I said, I only started the auto increasement with a high number when I installed / upgraded.

But if I understand you correctly, this high "pid" number can cause the delay and cpu usage ?

McKenzie

I checked your site on alexa.com in compare with autowp.ru and that is definitely no "too many" visitor problem. Maybe a bot/tramp problem but then you should have very high traffic. You told me that you have a mysql problem but I think that there was something wrong on updating (too big site?). You sould install the backup plugin make a backup, save the album folder (where your pics are inside) and download an all new cpg 1.4.19 and install it (no upgrade), install the plugin again and restore your database. But if there is someting wrong in the tabels you should look with a repair-tag (I posted the link).

McKenzie

Check your databse first with http://felipecruz.com/repair-mysql-database.php (the problem must be in that database) or there is something wrong with your server or some grabber etc. don't like your site or want download all pics. http://www.spider-trap.de/en_index.html could help you but you should first check your logflies.

JohannM

I dumped my pictures table ... and it seems that the load on the CPU is normal now ... seems to me that there is in fact a problem somewhere.

I will have to redo this specific installation.

Thanx for your help so far.

I do not allow users to post their own pics on this, you think it is wize to delete some query strings to exclude the functions used for user pics ?

McKenzie

I posted the link for checking tables.  No, some cpg-webmaster forbids their user to upload pics, this could be a problem if the table is broken, but you can create a user account, enable user upload and check if something is broken, but I don't think so. But you should make from now on after every change a backup (with the plugin I posted on the first page), save all backups on your local disk and put them also on an external hard disk (for 3 month) so nothing should happen and download (copy) once a month your picture folder to your local disk, so that this can't happend anymore.

McKenzie

Ah your page is working  :) . Is everything fine now?

Joachim Müller

Quote from: McKenzie on September 04, 2008, 09:15:56 PM
Maybe you must reinstall your gallery
Not a bright idea - don't!

Quote from: McKenzie on September 04, 2008, 09:15:56 PM
I hope Joachim can help you?
This is not a hotline. There is no need to PM me (which is what JohannM did, although both board rules as well as my signature clearly say that you mustn't). I'm reluctant to be forced to look into, so I won't.

Quote from: JohannM on September 04, 2008, 09:42:43 PM
When I created the db tables for 2008, I set the auto increasement of pid to 25 848.
Huh? You mangled with the auto_increase option. Not a very bright move neither.

Quote from: McKenzie on September 04, 2008, 10:07:00 PM
If you have 10.000.000.000.000.000.000 Pics and 0 vistors you have 1-2% CPU only.
Yeah, because you'd need the computer of the "U.S.S. Enterprise NCC-1701-E" to perform such a stunt. With computers currently available, you probably won't be able to host 10 billion billions of pics. Your example is a bit drastic ;)

JohannM

Mc

Yes, it's seems to be ok now.  What I did is I backup my pictures table, dropped it, and re-uploaded the backup. Seems to work fine now.

As for Joachim, sorry to PM you, but I was not sure if you do monitor this kind of posts ... but by this time I know your bark is bigger than your bite ... so I won't take your remarks personally. Besides, your a fine person ...

Nibbler

Quote from: JohannM on September 04, 2008, 08:31:33 PM
Taking a look at the mysql.log file I believe I have tracked down the issue:

Note: ****** changed due to security reasons, YSF-PHOTOS2008 is the database name used on my site

# Time: 080904 18:06:52
# User@Host: *****[*****] @ localhost []
# Query_time: 1303  Lock_time: 0  Rows_sent: 50  Rows_examined: 152474977
use YSF-PHOTOS2008;
SELECT user_id as user_id, user_name as user_name, user_email as user_email, UNIX_TIMEST
AMP(user_regdate) as user_regdate, UNIX_TIMESTAMP(user_lastvisit) as user_lastvisit, use
r_active as user_active, COUNT(pid) as pic_count, ROUND(SUM(total_filesize)/1024) as dis
k_usage, group_name, group_quota FROM `YSF-PHOTOS2008`.cpg_users AS u INNER JOIN cpg_use
rgroups AS g ON u.user_group = g.group_id LEFT JOIN cpg_pictures AS p ON p.owner_id = u.
user_id GROUP BY user_id ORDER BY user_regdate DESC LIMIT 0, 50;

According to the sysadmin, the number of rows (152474977) being queried is the source for the cpu to run in overhead / full capacity.

You know why this is ?

Quote from: JohannM on September 04, 2008, 11:27:15 PM
I do not allow users to post their own pics on this.

This issue has been posted before. MySQL doesn't like it when all the pictures have the same owner_id. If you search the board you should be able to find alternate code that helps.

JohannM

Nibler

I am the only one allowed to upload pics in the albums, no users are allowed.

What search string should I try to look for ?