coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: russian_knight on June 27, 2004, 12:22:26 PM

Title: [solved] > 1k users --> very slow
Post by: russian_knight on June 27, 2004, 12:22:26 PM
Hello. My gallery have already above 1k users. From clicking "users" till geting list i wait about 15-20 sec. Is it my or Coppermine bug? What can i do to optimize this?
Title: Re: > 1k users --> very slow
Post by: omniscientdeveloper on June 27, 2004, 12:26:04 PM
Set it to debug mode to see how long it takes to generate the page. There can be many factors for slow performance.


-omni
Title: Re: > 1k users --> very slow
Post by: russian_knight on June 27, 2004, 12:37:05 PM
USER:
------------------
Array
(
    [ID] => 0ffa5a71d97a39c4bf169a8bfaa10189
    [am] => 1
    [liv] => Array
        (
           
Title: Re: > 1k users --> very slow
Post by: omniscientdeveloper on June 27, 2004, 12:45:06 PM
QuotePage generated in 25.897 seconds - 9 queries in 25.825 seconds


Hmm...


[edit]

Post a link with a test user account.

[/edit]
Title: Re: > 1k users --> very slow
Post by: russian_knight on June 27, 2004, 01:17:26 PM
Sorry, but gallery is in LAN.

You think it is my problem, not the problem of the way Coppermine using DB?

Someone, who ownes galery with > 1k users, comment please.

P.S. Russian translation is 90% ready.
Title: Re: > 1k users --> very slow
Post by: Joachim Müller on June 27, 2004, 11:36:27 PM
this has been asked before: we need to limit the query on the memberlist page, with tabs at the bottom that let you go to the next page. Others who run a gallery with a lot of users reported similar issues in the past.

@russian_knight: unless you can code this yourself, you'll have to wait for some dev team member to have this fixed. Consider it a bug if you want.

@Omni: care to assign this issue to you? Afaik Oasis has coded a workaround for his huge gallery (although cpg1.2.1), as he had run into similar issues in the past.

GauGau
Title: Re: > 1k users --> very slow
Post by: omniscientdeveloper on June 28, 2004, 12:17:49 AM
No problem. I think that there should be some free stress testing software out there also.


-omni
Title: Re: > 1k users --> very slow
Post by: omniscientdeveloper on June 30, 2004, 12:59:09 PM
Fixed in stable and devel
files: sql/update.sql and usermgr.php (for updates)


You should be able to download these two files from webcvs and run update.php. The problem was in a missing index "owner_id".




-omni
Title: Re: > 1k users --> very slow
Post by: russian_knight on June 30, 2004, 10:13:46 PM
Sorry, but:
Page generated in 48.855 seconds - 9 queries in 48.785 seconds - Album set :

I do everything what You say. (download, remove, update.php)
Title: Re: > 1k users --> very slow
Post by: omniscientdeveloper on July 01, 2004, 12:32:15 AM
verify in your database with phpmyadmin that the table cpg11d_pictures has an index column "owner_id". I tested it on mine with 4k+ users.


-omni


[edit]

download update.sql again. it was missing a ";"

[/edit]
Title: Re: > 1k users --> very slow
Post by: GGallery on July 01, 2004, 04:30:47 AM
execute all these mysql queries 'by hand' and check what's so slow.
also check sort_buffer and key_buffer in /etc/my.cnf
Title: Re: > 1k users --> very slow
Post by: russian_knight on July 01, 2004, 11:41:59 AM
Quote from: omniscientdeveloper on July 01, 2004, 12:32:15 AM
download update.sql again. it was missing a ";"

Thanks!!
Page generated in 0.158 seconds - 9 queries in 0.083 seconds - Album set :
Title: Re: > 1k users --> very slow
Post by: Joachim Müller on July 01, 2004, 02:30:36 PM
is this solved then?

GauGau
Title: Re: > 1k users --> very slow
Post by: russian_knight on July 01, 2004, 03:45:40 PM
Yes, but i`v got another error. I don`t know is it linked with previous... On pushing "My profile" i get:

There was an error while processing a database query.

While executing query "SELECT user_name, user_email, user_group, UNIX_TIMESTAMP(user_regdate) as user_regdate, group_name, user_location, user_interests, user_website, user_occupation, user_group_list, COUNT(pid) as pic_count, ROUND(SUM(total_filesize)/1024) as disk_usage, group_quota FROM cpg11d_users AS u INNER JOIN cpg11d_usergroups AS g ON user_group = group_id LEFT JOIN cpg11d_pictures AS p ON p.owner_id = u.user_id WHERE user_id ='1' GROUP BY user_id " on 0

mySQL error: Unknown column 'user_location' in 'field list'

File: /var/www/html/photo/include/functions.inc.php - Line: 110
Title: Re: > 1k users --> very slow
Post by: Casper on July 01, 2004, 04:16:38 PM
Did you download the update.sql from stable, or devel.  The devel one will cause this if used on a stable install, as there are differences.
Check your database, users table, and look for,

'user_location'.  I suspect it does not exist anymore, but you will have 'user_profile1'.

If this is the case, you will need to change the profile fields back, as below;

Change `user_profile1` to `user_location`
Change `user_profile2` to `user_interests`
Change `user_profile3` to `user_website`
Change `user_profile4` to `user_occupation`


Note, you can leave profile5 and profile6.  They will be used in version 1.4, and will cause no harm now.
Title: Re: > 1k users --> very slow
Post by: russian_knight on July 01, 2004, 05:19:01 PM
Oh, yes, i downloaded develop version. After renaming fields all is OK. Thank you =)

P.S. Is there any chance to add in users table field IP? I need that to kill identical accaunts.
Title: Re: > 1k users --> very slow
Post by: omniscientdeveloper on July 01, 2004, 06:12:03 PM
Quoteis this solved then?

yea. :)


-omni
Title: Re: > 1k users --> very slow
Post by: u3uk on July 01, 2004, 06:20:28 PM
QuoteP.S. Russian translation is 90% ready.
100%  ;)