Apache cannot make AJAX request
In my previous week, I just found that my machine have a problem when try to make the second request during the first request still loading. I think something must be wrong in the communication process between Windows - Apache - PHP / MySQL.
I see that during the problem occur, my Windows have many TIME_WAIT TCP/IP connection. So, after search about the apache problem, I try to change Registry of Windows to increase the number of User-port and reduce TIME_WAIT time before close the connection.
The problem was not solved. I try another way by change the Apache MPM parameter, I reduce number of concurrent connection, disable KeepAlive and Disable Win32AcceptEx. Problem seem like disappear for just only a moment and come back.
I found that my Apache (mod_status) is working properly during the Apache not respond. HTML files can be load. So, it should not be about the connection problem, it should be something wrong in our PHP Framework OR Apache <-> PHP.
Last, I try the Apache Benchmark to shooting my Apache server by making 10 concurrent to get more information. I found that all PHP-related files cannot make the concurrent connections at all. (even it just A simple PHP_Info file)
Hmmm, this should be about PHP extension, I think. I begin to disable one-by-one. and....
Yea!.... Finally I found that it is because Alternative PHP Cache (APC -- PHP extension) that make the error occurs. This problem cannot be found in PHP Error log, Apache Error log, MySQL Error Log or whatever. Finally I found from the APC website that my version have the Win7 file locking problem. They fixed in the new released. So, that is the finally time I can run concurrent HTTP Request without problem.
I am in a trap for really long time because it hard to investigate the component problem when there are no any information in the error log. I also trap by the session_write_close() php function that it is about file locking problem.
So, In case that you may have the same problem with me, if you have APC loaded in your PHP configuration, try to disable it and let check, if it help.