У меня очень загадочная проблема с моим сервером Apache в XAMPP. У меня есть сценарий PHP, который загружает различное содержимое с веб-сайта, он имеет несколько параллельных запросов.
Скрипт не содержит ошибок программирования и отлично работает на моем другом сервере.
Похоже, что на сервере не хватает «ресурсов». Я не знаю, какой ресурс отсутствует, скрипт останавливается с ошибками вроде:
Fatal error: Call to a member function children() on a non-object in C:\xampp\htdocs\script\response.php on line 39
Warning: (null)(): 26 is not a valid cURL handle resource in Unknown on line 0
Warning: (null)(): 30 is not a valid cURL handle resource in Unknown on line 0
Warning: (null)(): 53 is not a valid cURL handle resource in Unknown on line 0
Warning: (null)(): 97 is not a valid cURL handle resource in Unknown on line 0
На сервере достаточно свободной оперативной памяти и процессора, что также правильно указано в PHP-скрипте.
PHP.ini такой же, как на моем другом сервере, поэтому я не думаю, что это проблема.
Я очистил все свои журналы и запустил скрипт один раз, это было в моем журнале после этого:
Журнал ошибок PHP:
[18-Apr-2016 16:55:38 Europe/Berlin] PHP Warning:simplexml_load_string(): Entity: line 6: parser error : Opening and ending tag mismatch: hr line 5 and body in C:\xampp\htdocs\script\ice2.php on line 98
[18-Apr-2016 16:55:38 Europe/Berlin] PHP Warning: simplexml_load_string(): </body> in C:\xampp\htdocs\script\ice2.php on line 98
[18-Apr-2016 16:55:38 Europe/Berlin] PHP Warning: simplexml_load_string(): ^ in C:\xampp\htdocs\script\ice2.php on line 98
[18-Apr-2016 16:55:38 Europe/Berlin] PHP Warning: simplexml_load_string(): Entity: line 7: parser error : Opening and ending tag mismatch: body line 3 and html in C:\xampp\htdocs\script\ice2.php on line 98
[18-Apr-2016 16:55:38 Europe/Berlin] PHP Warning: simplexml_load_string(): </html> in C:\xampp\htdocs\script\ice2.php on line 98
[18-Apr-2016 16:55:38 Europe/Berlin] PHP Warning: simplexml_load_string(): ^ in C:\xampp\htdocs\script\ice2.php on line 98
[18-Apr-2016 16:55:38 Europe/Berlin] PHP Warning: simplexml_load_string(): Entity: line 8: parser error : Premature end of data in tag html line 1 in C:\xampp\htdocs\script\ice2.php on line 98
[18-Apr-2016 16:55:38 Europe/Berlin] PHP Warning: simplexml_load_string(): in C:\xampp\htdocs\script\ice2.php on line 98
[18-Apr-2016 16:55:38 Europe/Berlin] PHP Warning: simplexml_load_string(): ^ in C:\xampp\htdocs\script\ice2.php on line 98
[18-Apr-2016 16:55:38 Europe/Berlin] PHP Fatal error: Call to a member function children() on a non-object in C:\xampp\htdocs\script\response.php on line 39
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 643 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1314 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1357 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1400 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1500 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1522 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1544 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1601 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1623 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1645 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1667 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1689 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1711 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1755 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1777 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1799 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1847 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1869 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1926 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1974 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 643 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1314 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1357 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1400 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1500 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1522 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1544 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1601 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1623 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1645 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1667 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1689 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1711 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1755 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1777 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1799 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1847 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1869 is not a valid cURL handle resource in Unknown on line 0
[18-Apr-2016 16:55:39 Europe/Berlin] PHP Warning: (null)(): 1926 is not a valid cURL handle resource in Unknown on line 0
Журнал ошибок Apache:
[Mon Apr 18 16:54:50.074934 2016] [mpm_winnt:warn] [pid 177468:tid 216] AH00445: ThreadsPerChild of 100000 exceeds ThreadLimit of 1920, decreasing to match matches the server name
[Mon Apr 18 16:54:50.137334 2016] [core:warn] [pid 177468:tid 216] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon Apr 18 16:54:50.496135 2016] [ssl:warn] [pid 177468:tid 216] AH01909: RSA certificate configured for www.example.com:12345 does NOT include an ID which matches the server name
[Mon Apr 18 16:54:50.558535 2016] [mpm_winnt:notice] [pid 177468:tid 216] AH00455: Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.6 configured -- resuming normal operations
[Mon Apr 18 16:54:50.558535 2016] [mpm_winnt:notice] [pid 177468:tid 216] AH00456: Apache Lounge VC11 Server built: Nov 21 2013 20:13:01
[Mon Apr 18 16:54:50.558535 2016] [core:notice] [pid 177468:tid 216] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Mon Apr 18 16:54:50.558535 2016] [mpm_winnt:notice] [pid 177468:tid 216] AH00418: Parent: Created child process 175700
[Mon Apr 18 16:54:52.149738 2016] [ssl:warn] [pid 175700:tid 228] AH01909: RSA certificate configured for www.example.com:12345 does NOT include an ID which matches the server name
[Mon Apr 18 16:54:52.617739 2016] [ssl:warn] [pid 175700:tid 228] AH01909: RSA certificate configured for www.example.com:12345 does NOT include an ID which matches the server name
[Mon Apr 18 16:54:52.680139 2016] [mpm_winnt:notice] [pid 175700:tid 228] AH00354: Child: Starting 1920 worker threads.
Не могли бы вы определить, где проблема? Я думаю, что это может иметь какое-то отношение к рабочим потокам, но я попробовал все в httpd.conf и ничего не работает …
Спасибо за помощь!
Задача ещё не решена.
Других решений пока нет …