Serious memory usage, cpu load problems

redux

Joined: 2005-11-12
Posts: 2
Posted: Sat, 2005-11-12 20:08

We currently have a user on a shared hosting platform, and any requests for /gallery2/main.php off of his URL result in an apache process which immediately begins to consume upwards of 90% memoy, eventually over a 1 minute interval it will exhaust all physical and virtually memory which in turn causes the linux load average to skyrocket, eventually the system locks up or attempts to kill off the pid. Error logs from our logwatch rotation are showing kernel errors in regards to the memory utilization. I can clearly watch the pid generate and take over the system after making the URL request.

What could be causing this? What steps should we take to remedy it?


Gallery version 2 A4:
PHP version: 4.4.1
PHPInfo Link http://newyork.networkphantom.net/php.php:
Webserver Apache 1.3.34:
Database Mysql 4.1.13:
Activated toolkits GD:
Operating system Linux:
Browser Firefox 1.5:

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-11-12 20:19

see:
http://codex.gallery2.org/index.php/Gallery2:How_to_use_less_CPU

so an upgrade to the latest version (nightly snapshot) could help (site admin -> general: switch to "nice").

 
redux

Joined: 2005-11-12
Posts: 2
Posted: Sat, 2005-11-12 20:29

This seems to address processor utilization and not memory utilization...

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-11-12 22:06

yep, but you might be interested in that too :)

@memory usage:
probably this user is either:
- importing his G1 albums: a one-time task which is very memory intensive
or
- running a maintenance task "build all thumbnails and derivatives" which also might take quite some memory

normal G2 operations just take in the order of 1 second

there are memory related bugs:
- the exif module we use does sometimes a poor job at parsing images and tries to allocate as much memory as possible
resolution: disable the exif module or don't use such images. we'll update the exif module soon.

what you should do anyway:
- set the php memory limit / zend memory limit to around 20 - 30 MB and not higher. normal G2 requests don't need more than 16 MB.