Advanced search  

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

Pages: 1 [2]   Go Down

Author Topic: user manager times out...  (Read 23997 times)

0 Members and 1 Guest are viewing this topic.

lordprodigy

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 228
    • B514 ///
Re: user manager times out...
« Reply #20 on: April 04, 2006, 03:59:14 pm »

yah, I have the same problem with only 472 users registered :( I will try the fix.

update: fix worked beautifully. reload was so fast... thanks Nibbler!!!
« Last Edit: April 04, 2006, 04:07:22 pm by lordprodigy »
Logged

pokk

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: user manager times out...
« Reply #21 on: April 07, 2006, 01:53:49 pm »

I fixed it :D

Solution was to force the index in udb_base.inc.php

Code: [Select]
// Build SQL table, should work with all bridges
        $sql = "SELECT {$f['user_id']} as user_id, {$f['username']} as user_name, {$f['email']} as user_email, {$f['regdate']} as user_regdate, {$f['lastvisit']} as user_lastvisit, {$f['active']} as user_active, ".
               "COUNT(pid) as pic_count, ROUND(SUM(total_filesize)/1024) as disk_usage, group_name, group_quota ".
               "FROM {$this->usertable} AS u ".
               "INNER JOIN {$C['TABLE_USERGROUPS']} AS g ON u.{$f['usertbl_group_id']} = g.group_id ".
               "LEFT JOIN {$C['TABLE_PICTURES']} AS p FORCE INDEX ( owner_id ) ON p.owner_id = u.{$f['user_id']} ".
               $options['search'].
               "GROUP BY user_id " . "ORDER BY " . $sort_codes[$options['sort']] . " ".
               "LIMIT {$options['lower_limit']}, {$options['users_per_page']};";
How this code would be with 1.3.5? I have critical error: there was an error while processing a database query.l
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: user manager times out...
« Reply #22 on: April 07, 2006, 04:37:52 pm »

don't try to apply code that was made for cpg1.4.x to a cpg1.3.x install. Undo your changes and restore the original file. There's a reason why we have different support boards for different coppermine versions ::).
Logged

kateheaven

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 78
    • Kate Hudson Heaven
Re: user manager times out...
« Reply #23 on: September 13, 2006, 01:18:12 pm »

I fixed it :D

Solution was to force the index in udb_base.inc.php

Code: [Select]
// Build SQL table, should work with all bridges
        $sql = "SELECT {$f['user_id']} as user_id, {$f['username']} as user_name, {$f['email']} as user_email, {$f['regdate']} as user_regdate, {$f['lastvisit']} as user_lastvisit, {$f['active']} as user_active, ".
               "COUNT(pid) as pic_count, ROUND(SUM(total_filesize)/1024) as disk_usage, group_name, group_quota ".
               "FROM {$this->usertable} AS u ".
               "INNER JOIN {$C['TABLE_USERGROUPS']} AS g ON u.{$f['usertbl_group_id']} = g.group_id ".
               "LEFT JOIN {$C['TABLE_PICTURES']} AS p FORCE INDEX ( owner_id ) ON p.owner_id = u.{$f['user_id']} ".
               $options['search'].
               "GROUP BY user_id " . "ORDER BY " . $sort_codes[$options['sort']] . " ".
               "LIMIT {$options['lower_limit']}, {$options['users_per_page']};";


I'm having the same problem with the user manager timing out.
which part of udb_base.inc.php do i add this code into? i added it to the end of it (before ?>) and got this error message > Fatal error: Using $this when not in object context in /path/to/bridge/udb_base.inc.php on line 801
i'm using 1.4.9 (stable)
Logged

Nibbler

  • Guest
Re: user manager times out...
« Reply #24 on: September 13, 2006, 01:21:59 pm »

You need to replace code, not add code. Search the file for  'Build SQL table, should work with all bridges' to find the bit to replace.
Logged

kateheaven

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 78
    • Kate Hudson Heaven
Re: user manager times out...
« Reply #25 on: September 13, 2006, 03:59:09 pm »

ah ok, thanks Nibbler. It works now :)
Logged

kateheaven

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 78
    • Kate Hudson Heaven
Re: user manager times out...
« Reply #26 on: December 20, 2006, 12:21:56 am »

does this work with the latest coppermind version? i've tried adding the code in but i get a 'database error' message when I open my user manager page...

I'm using v 1.4.9
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: user manager times out...
« Reply #27 on: December 20, 2006, 11:05:05 am »

The name of the app is "Coppermine", not "Coppermind". Most recent stable release is cpg1.4.10, not cpg1.4.9.
Hack should work in all cpg1.4.x versions. If you have an error message, enable debug_mode and post the actual error message (not the debug_output).
Logged

kateheaven

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 78
    • Kate Hudson Heaven
Re: user manager times out...
« Reply #28 on: December 21, 2006, 02:36:00 am »

the 'd' instead of the 'e' was a typo - easy mistake.

this is what I get after enabling the debug mode, hope it's the right thing to post.

'While executing query "SELECT user_id as user_id, user_name as user_name, user_email as user_email, UNIX_TIMESTAMP(user_regdate) as user_regdate, UNIX_TIMESTAMP(user_lastvisit) as user_lastvisit, user_active as user_active, COUNT(pid) as pic_count, ROUND(SUM(total_filesize)/1024) as disk_usage, group_name, group_quota FROM `nkidhwx_copp1`.cpg11d_users AS u INNER JOIN cpg11d_usergroups AS g ON u.user_group = g.group_id LEFT JOIN cpg11d_pictures AS p FORCE INDEX ( owner_id ) ON p.owner_id = u.user_id GROUP BY user_id ORDER BY user_regdate DESC LIMIT 0, 25;" on Resource id #5

mySQL error: Key column 'owner_id' doesn't exist in table'


This was after adding the code in this thread into the udb_base.inc.php file.
Logged

Nibbler

  • Guest
Re: user manager times out...
« Reply #29 on: December 21, 2006, 01:05:18 pm »

You have an index missing. Ensure your mysql user has the ALTER privilege and run update.php.
Logged

marpessa

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: user manager times out...
« Reply #30 on: July 16, 2007, 11:00:36 am »

Where is the udb_base.inc.php file supposed to be? I cannot find it in my includes folder.
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: user manager times out...
« Reply #31 on: July 16, 2007, 11:13:40 am »

its in 'bridge' directory.
Logged
Chief Geek at Ranium Systems

socomoroco

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: user manager times out...
« Reply #32 on: November 16, 2007, 04:21:07 am »

this is great, i was having the same problem, thanks nibbler.

i have money here, give me your account number.


i am using 1.4.14
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: user manager times out...
« Reply #33 on: November 16, 2007, 08:44:42 am »

i have money here, give me your account number.
see We need your help
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: user manager times out...
« Reply #34 on: September 08, 2010, 05:58:09 pm »

This solution also works in 1.5.x. Is there a problem with the solution that prevents it from becoming core code?
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Nibbler

  • Guest
Re: user manager times out...
« Reply #35 on: September 08, 2010, 08:41:56 pm »

It's not really a solution - it's a very specific hack to fix this rare case. It may well cause problems if applied to galleries with different characteristics and/or other versions of MySQL. Can you reproduce this with the current version of MySQL (5.1.50)? If so then it might be worth filing a bug with them.
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: user manager times out...
« Reply #36 on: September 08, 2010, 11:27:26 pm »

It happened here => http://forum.coppermine-gallery.net/index.php/topic,66902.0.html
The version he is running is: 5.0.67
This was probably just a rare case like you said.

I'm not sure how to reproduce it, something to do with a large amount of users and a server/MySQL timeout?

If you think I should start a bug report I'll use his information.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Nibbler

  • Guest
Re: user manager times out...
« Reply #37 on: September 09, 2010, 10:18:59 am »

From what I can remember it happens when the gallery has plenty of users, but all the pictures are uploaded by just one user (the admin). MySQL decides not to use the index that we have on owner_id due to the low cardinality (number of different values) of the index. As a result of this the query takes too long.
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.027 seconds with 21 queries.