ID: 35506 Updated by: [EMAIL PROTECTED] Reported By: broadmind at magicn dot com -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: windows 2000 server PHP Version: 5CVS-2005-12-01 (snap) New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2005-12-04 16:42:18] broadmind at magicn dot com I know that this problem comes from lots of mysql requests, but as a result of having a lot of tests, it may be due to the "include" statement, because my php codes have many "include" statements. For your test, my example codes is here. (the following codes are just for a test, not real codes) http://www.brickart.co.kr/logs/board.php.doc http://www.brickart.co.kr/logs/menu_search.php.doc 1) Please download these files and remove ".doc" suffix. 2) Run Windows task manager. 3) Please run board.php with your web browser. 4) To refresh this page, please press F5 key down continuously. (don't let it be pushed up) You can see the memory usage of Apache is only incremented. When it is over about 230MB, the process will be destroyed. ------------------------------------------------------------------------ [2005-12-02 01:21:30] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2005-12-02 01:16:03] broadmind at magicn dot com Sorry for my inadequate report. My PHP pages consist of a lot of mysql queries. Then, after requesting the one page, the memory usage of Apache is only incremented. After all, when it is over about 240MB for lots of PHP page requests, the apache server is shut down and restarted. At this time, "FATAL: erealloc(): Unable to allocate 24576 bytes" log is written to error.log file. Why it is a serious problem is that this phenomenon is reiterated continuously. ------------------------------------------------------------------------ [2005-12-01 17:35:56] broadmind at magicn dot com Description: ------------ My server environment is, CPU : AMD Opteron 240 x2 (2 cpu) RAM : 2 GB Apache 1.3.34 Mysql 5.0.16 PHP : 5.1.2-dev Snap stable version. In error logs, I could find the following error message frequently. FATAL: erealloc(): Unable to allocate 24576 bytes So, opening windows task manager, I have monitored the memory usage of Apache server. I found this log is happen when it is over 240MB duing to heavily access to mysql through a PHP page. Because the memory size of my server is 2GB, it is nonsense to say that this problem is duing to the lack of memory. In my guess, there may be a memory leak in the memory manager. Actual result: -------------- FATAL: erealloc(): Unable to allocate 24576 bytes the above log is leaved in error.log file and Apache server is restarted, causing the lose of POST data or "page not found". ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35506&edit=1