jensvoid / lorg

Apache Logfile Security Analyzer
GNU General Public License v2.0
209 stars 50 forks source link

Fatal error: Allowed memory size of 134217728 bytes exhausted #5

Closed linuxitux closed 8 years ago

linuxitux commented 8 years ago

I had this error running lorg (LORG v0.41 | Sat Jun 15 20:20:22 CEST 2013):

./lorg -d phpids -u -g ~/ssl_access.log

[>] Creating summary for 'ssl_access.log'

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 76 bytes) in /usr/home/emi/lorg/lorg on line 1417
linuxitux commented 8 years ago

Solved increasing memory_limit to 1024M in php.ini

;memory_limit = 128M
memory_limit = 1024M
jensvoid commented 8 years ago

Maybe it makes sense to use inline code such as:

ini_set("memory_limit", "1024M");

Out of curiosity: how big is your ssl_access.log? is it really big or has LORG a memory leak somewere? Using the -n flag sould also work for low-mem systems as line-for-line is processed without generation of large datasets in memory.

linuxitux commented 8 years ago

Kind of, it size is 630 MB:

emi@hal9000:~/scripts/lorg % ll -h ~/ssl_access.log
-rw-r-----  1 emi  wheel   630M Jul 11 13:29 /home/emi/ssl_access.log