Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

php memory exhaustion on large pcaps #15

Closed
petiepooo opened this issue May 26, 2016 · 1 comment
Closed

php memory exhaustion on large pcaps #15

petiepooo opened this issue May 26, 2016 · 1 comment

Comments

@petiepooo
Copy link

I ran into an issue where, after submitting the capme web form, it would hang on "sending request." I located the following error in /var/log/apache2/error.log:

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 167 bytes) in /var/www/capme/.inc/callback.php on line 278, referer: https://.......
error writing "stdout": broken pipe
while executing
"puts "${SESSION_STATE}: [lindex $msg 2]" "
("while" body line 24)
.....

I increased the memory_limit setting in /etc/php5/apache2/php.ini from the default 128M (to 1024M since I have lots of memory, but 256M, 384M or 512M is probably more sane). After restarting apache2, retrying the request completed successfully. For reference, the resulting pcapfile was 78M, and was just someone downloading the winzip installer...

I recommend increasing the memory limit to at least 256M for capme. It may actually be more wise to make a call to ini_set('memory_limit', '128M'); within callback.php rather than setting it globally; I'll leave that to the discretion of someone better at PHP than I..

@dougburks
Copy link
Contributor

added the following to callback.php:

ini_set('memory_limit', '350M');

commit:
ce820f0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants