i have an angular application with Yii2 restful , when i load application there are a lot of resources with multiple rest api requests at the first.
sometimes a rest api failed with (failed) status and net::ERR_CONNECTION_RESET in chrome browser. when an api request failed all other api requests also failed.
i'm using windows , apache , php 7.1 (xampp)
also i have same problem with linux and nginx
my apache error log :
[Tue Oct 09 11:16:12.832792 2018] [mpm_winnt:notice] [pid 3392:tid 508] AH00428: Parent: child process 11936 exited with status 3221226356 -- Restarting.
[Tue Oct 09 11:16:13.038794 2018] [ssl:warn] [pid 3392:tid 508] AH01909: www.example.com:4433:0 server certificate does NOT include an ID which matches the server name
[Tue Oct 09 11:16:13.061795 2018] [mpm_winnt:notice] [pid 3392:tid 508] AH00455: Apache/2.4.33 (Win32) OpenSSL/1.0.2n PHP/7.1.16 configured -- resuming normal operations
[Tue Oct 09 11:16:13.061795 2018] [mpm_winnt:notice] [pid 3392:tid 508] AH00456: Apache Lounge VC14 Server built: Mar 22 2018 10:55:30
[Tue Oct 09 11:16:13.061795 2018] [core:notice] [pid 3392:tid 508] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Tue Oct 09 11:16:13.064796 2018] [mpm_winnt:notice] [pid 3392:tid 508] AH00418: Parent: Created child process 3312
[Tue Oct 09 11:16:13.595807 2018] [ssl:warn] [pid 3312:tid 440] AH01909: www.example.com:4433:0 server certificate does NOT include an ID which matches the server name
[Tue Oct 09 11:16:13.708809 2018] [ssl:warn] [pid 3312:tid 440] AH01909: www.example.com:4433:0 server certificate does NOT include an ID which matches the server name
[Tue Oct 09 11:16:13.731810 2018] [mpm_winnt:notice] [pid 3312:tid 440] AH00354: Child: Starting 150 worker threads.
error image in chrome
I think it is about ThreadStackSize of apache but i can't increase it.
Is there anyone can help me please ?
Finally i found answer , it was about yii2 logging stack, when multiple requests sent to server concurrently, there were a lot of log stack that kept until the request ended then yii2 saved logs to database .
Also debugger module keeps logs until end of request.
When i decreased stack size of logs, requests executed correctly.
another way to solving this problem is changing db session to file session but i think its not good idea because we lose the speed and performance to executing requests.
Related
I have created an SSL certificate, and imported it.
My Apache is working, but my localhost website is not showing https://. The site is up and running but only as http://.
I followed the steps shown here:
http://robsnotebook.com/xampp-ssl-encrypt-passwords
I am wondering if my problem is "One thing to keep in mind with this redirection is that if you have virtual hosts, you need to place the redirection code (with the RewriteCond and RewriteRule) inside of your virtual host declarations, otherwise the redirection won’t work"? Not sure what it is or how to do it.
This video is the same as above. I followed it and debugged the code, which is why my Apache is running. For me the issue was with the Code, not Ports being blocked as many other people had problems with, especially because of Skype, etc.
https://www.youtube.com/watch?v=PQZ8wzV9VU8
Hopefully, this makes sense, if you have any questions I'll do my best to answer them. Any advice, tips or links would be useful. Thank you.
I haven't found away how to correct the "match," if this is the problem. Did I enter something incorrectly when creating the SSL certificate?. Error Log is as follows:
[Fri May 19 16:19:14.955930 2017] [ssl:warn] [pid 6812:tid 252]
AH01909: localhost:4433:0 server certificate does NOT include an ID
which matches the server name
[Fri May 19 16:19:15.015933 2017] [core:warn] [pid 6812:tid 252]
AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten --
Unclean shutdown of previous Apache run?
[Fri May 19 16:19:15.218945 2017] [ssl:warn] [pid 6812:tid 252]
AH01909: localhost:4433:0 server certificate does NOT include an ID
which matches the server name
[Fri May 19 16:19:15.271948 2017] [mpm_winnt:notice] [pid 6812:tid
252] AH00455: Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.21
configured -- resuming normal operations
[Fri May 19 16:19:15.271948 2017] [mpm_winnt:notice] [pid 6812:tid
252] AH00456: Apache Lounge VC11 Server built: Oct 13 2015 10:54:13
[Fri May 19 16:19:15.271948 2017] [core:notice] [pid 6812:tid 252]
AH00094: Command line: 'c:\xampp\apache\bin\httpd.exe -d
C:/xampp/apache'
[Fri May 19 16:19:15.274948 2017] [mpm_winnt:notice] [pid 6812:tid
252] AH00418: Parent: Created child process 5588
[Fri May 19 16:19:16.048993 2017] [ssl:warn] [pid 5588:tid 264]
AH01909: localhost:4433:0 server certificate does NOT include an ID
which matches the server name
[Fri May 19 16:19:16.473017 2017] [ssl:warn] [pid 5588:tid 264]
AH01909: localhost:4433:0 server certificate does NOT include an ID
which matches the server name
[Fri May 19 16:19:16.542021 2017] [mpm_winnt:notice] [pid 5588:tid
264] AH00354: Child: Starting 150 worker threads.
So today, I was trying to do two things: get rid of extensions like .php in my domains, and use an A record to point a subdomain I have to the IP of the server on which the site I am developing is running on.
I did both at the same time, then restarted httpd, but when it came back up - I couldn't access the website at all. httpd claims it is running fine. I decided to remove the rewrite rules to see if I had somehow introduced a bug into httpd.conf, but after another restart, it still didn't serve webpages. I tried restarting the server instance - no luck again.
I hadn't changed anything else and the server was serving webpages fine before this. I am trying to access the page using just the IP address, so I don't think the A record could have made a difference either.
The output in httpd's error log is the following:
[Wed Aug 10 16:39:44.263098 2016] [suexec:notice] [pid 1843] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
[Wed Aug 10 16:39:44.308130 2016] [auth_digest:notice] [pid 1843] AH01757: generating secret for digest authentication ...
[Wed Aug 10 16:39:44.308701 2016] [lbmethod_heartbeat:notice] [pid 1843] AH02282: No slotmem from mod_heartmonitor
[Wed Aug 10 16:39:44.662464 2016] [mpm_prefork:notice] [pid 1843] AH00163: Apache/2.4.18 (Amazon) configured -- resuming normal operations
[Wed Aug 10 16:39:44.662486 2016] [core:notice] [pid 1843] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Aug 10 16:40:02.960708 2016] [mpm_prefork:notice] [pid 1843] AH00171: Graceful restart requested, doing restart
[Wed Aug 10 16:40:03.042697 2016] [auth_digest:notice] [pid 1843] AH01757: generating secret for digest authentication ...
[Wed Aug 10 16:40:03.043290 2016] [lbmethod_heartbeat:notice] [pid 1843] AH02282: No slotmem from mod_heartmonitor
[Wed Aug 10 16:40:03.105719 2016] [mpm_prefork:notice] [pid 1843] AH00163: Apache/2.4.18 (Amazon) configured -- resuming normal operations
[Wed Aug 10 16:40:03.105729 2016] [core:notice] [pid 1843] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Aug 10 16:40:03.105750 2016] [mpm_prefork:warn] [pid 1843] AH00167: long lost child came home! (pid 1968)
Any help?
Edit: I used dig on the domain that I pointed with the A-record, and it resolves to the IP (which currently times out but is otherwise the right IP). So it seemingly isn't an issue there, either. I can connect to the server with SSH fine.
I recently updated my xampp installation to current version with php7, however every thing seem to work fine until i tried testing out a laravel 5.2 project.
Accessing a page that doesn't make a database connection has no issue, but trying accessing a route that makes a db query i get the error "ERR_CONNECTION_RESET".
The error log doesn't really show any concrete errors that cause this.
[Fri Apr 22 20:50:41.365814 2016] [ssl:warn] [pid 2856:tid 436] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Apr 22 20:50:41.422857 2016] [mpm_winnt:notice] [pid 2856:tid 436] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.5 configured -- resuming normal operations
[Fri Apr 22 20:50:41.422857 2016] [mpm_winnt:notice] [pid 2856:tid 436] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39
[Fri Apr 22 20:50:41.422857 2016] [core:notice] [pid 2856:tid 436] AH00094: Command line: 'C:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Fri Apr 22 20:50:41.427857 2016] [mpm_winnt:notice] [pid 2856:tid 436] AH00418: Parent: Created child process 7024
I have gone through php.ini configuration several times. What could cause this problem?
I have been working with PHP 5.xx for years but recently updated to PHP 7. I can't create sessions.
I have read the documentation.
In earlier PHP, you just have to do:
session_start();
to start session, but this doesn't work with PHP 7 and my page keeps loading. I provided the array in the parameter too as documented on the PHP website but still it keeps loading the page.
I have tried this:
session_start([
'cache_limiter' => 'private',
'read_and_close' => true,
]);
But my browser keeps loading and after few seconds it displays 'This webpage is not available'
Apache restart errors:
[Wed Dec 30 00:45:16.470001 2015] [mpm_winnt:notice] [pid 2384:tid 376] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.0 configured -- resuming normal operations
[Wed Dec 30 00:45:16.470001 2015] [mpm_winnt:notice] [pid 2384:tid 376] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39
[Wed Dec 30 00:45:16.470001 2015] [core:notice] [pid 2384:tid 376] AH00094: Command line: 'c:\xampp\apache\bin\httpd.exe -d C:/xampp/apache'
[Wed Dec 30 00:45:16.470001 2015] [mpm_winnt:notice] [pid 2384:tid 376] AH00418: Parent: Created child process 1716
[Wed Dec 30 00:45:17.172064 2015] [ssl:warn] [pid 1716:tid 384] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 30 00:45:17.343941 2015] [ssl:warn] [pid 1716:tid 384] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Dec 30 00:45:17.375192 2015] [mpm_winnt:notice] [pid 1716:tid 384] AH00354: Child: Starting 150 worker threads.
I found its a bug related to xampp version i.e. x86 or x64 bit.
I have a system with x64 bit windows and i installed a xampp with php7 but it was x86 bit. This was a reason for that error apache crashes.
Now i separately installed apach2.4 (x64) and PHP7.0.1 which is working perfect now.
My first post, hope someone can help......!
Firstly the context & my situation: I've worked in IT since 1972 (so can guess my age!), started off programming in COBOL & Assembler. My career progressed through development roles into IT management (Project/Programme/IT Director). Became unemployed in 2012 and have not been able to land a job in IT management role, so have decided to explore other avenues - return to my developer roots and update my skills & self-learn web technologies. After a bit of research, decided that PHP, Apache and MYSQL was the most cost-effective & opportunity enhancing way to go. Now I mention my background to make readers aware that although I have a good understanding of most IT Concepts and techniques my specific tech skills are very out of date, having been a driver rather than a mechanic for at least the last 25 years!.
So armed with lots of books on the subject borrowed from the library and several viewed youtube videos, I am trying to set up a PHP/Apache/MYsQL dev environment on my Windows 8 PC to learn and develop a proof-of-concept app for an idea that I have.
So here's the problem that I has stumped me:
- I have installed Apache 2.4.9, PHP 5.4 and Mysql 5.6 on my windows 8 pc
- I have edited the php.ini and httpd.conf file as per instructions
- I have created an index.php which contains phpinfo () surrounded by the php tags
- I Enter localhost in to browser (chrome) and phpinfo executes OK
- I create a .php file and put in phpinfo () surrounded by the php tags and it finds the file and executes OK
- Now If I edit said .php and put some valid php echo statements in before the phpinfo, they display OK, along with the phpinfo output
- but if I edit said .php file and remove the phpinfo () statement, the browser returns ...the requested web page is not available!
- if I edit the said .php file to put some valid php echo statements in after the phpinfo, the phpinfo output appears but not the php echo outputs
- NB Browser executes an html_test.htm file OK
- same occurs if I substitute phpcredits () for phpinfo ()
- I 've tried putting in an mysqli statement in a file with a phpinfo () and that returned web page is not available (i'm sure the Mysql integration will present another challenge!)
I checked / rechecked the basics of the set up and tried everything I know to get it working but to no avail - I'm sure its something quite simple and obvious but it's escaping me (suspect that it might be something to do with the php error handling but just don't know how to check)
Happy to provide more detailed info on request...
Can any young-gun help the old dinosaur out of the swamp?
Rgds
OK - Here's the code for file a) php_name_with_phpinfo.php:
$surname = "Mysurname";
$firstname = "Myfirstname";
echo $firstname . " " . $surname;
phpinfo ();
and here's the code for file b) php_name_without_phpinfo.php:
$surname = "Mysurname";
$firstname = "Myfirstname";
echo $firstname . " " . $surname;
Assure you that the php start and end tags are around both these bits of code but I can get them to apopear in this question (despite trying to enclose in " or 's)
file a) outputs
Myfirstname Mysurname and then the PHP Version 5.5.8 table
file b) outputs:
This web page is not available
I'm mystified
Here's the Apache logs from the last test:
[Sun Apr 13 19:32:15.005429 2014] [:error] [pid 6472:tid 1180] [client ::1:49856] PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in C:\Apache24\htdocs\index.php on line 5
[Sun Apr 13 19:32:15.671297 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00428: Parent: child process 6472 exited with status 255 -- Restarting.
[Sun Apr 13 19:32:15.809554 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00455: Apache/2.4.9 (Win32) configured -- resuming normal operations
[Sun Apr 13 19:32:15.809554 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00456: Apache Lounge VC9 Server built: Mar 17 2014 19:17:53
[Sun Apr 13 19:32:15.809554 2014] [core:notice] [pid 1932:tid 416] AH00094: Command line: 'C:\Apache24\bin\httpd.exe -d C:/Apache24'
[Sun Apr 13 19:32:15.810555 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00418: Parent: Created child process 3440
[Sun Apr 13 19:32:16.169793 2014] [mpm_winnt:notice] [pid 3440:tid 684] AH00354: Child: Starting 64 worker threads.
[Sun Apr 13 19:32:39.679326 2014] [:error] [pid 3440:tid 1160] [client ::1:49860] PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in C:\Apache24\htdocs\php_name_with_phpinfo.php on line 8
[Sun Apr 13 19:32:39.998571 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00428: Parent: child process 3440 exited with status 255 -- Restarting.
[Sun Apr 13 19:32:40.080627 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00455: Apache/2.4.9 (Win32) configured -- resuming normal operations
[Sun Apr 13 19:32:40.080627 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00456: Apache Lounge VC9 Server built: Mar 17 2014 19:17:53
[Sun Apr 13 19:32:40.080627 2014] [core:notice] [pid 1932:tid 416] AH00094: Command line: 'C:\Apache24\bin\httpd.exe -d C:/Apache24'
[Sun Apr 13 19:32:40.081628 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00418: Parent: Created child process 3500
[Sun Apr 13 19:32:40.463914 2014] [mpm_winnt:notice] [pid 3500:tid 372] AH00354: Child: Starting 64 worker threads.
[Sun Apr 13 19:32:50.459089 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00428: Parent: child process 3500 exited with status 255 -- Restarting.
[Sun Apr 13 19:32:50.548148 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00455: Apache/2.4.9 (Win32) configured -- resuming normal operations
[Sun Apr 13 19:32:50.549151 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00456: Apache Lounge VC9 Server built: Mar 17 2014 19:17:53
[Sun Apr 13 19:32:50.549151 2014] [core:notice] [pid 1932:tid 416] AH00094: Command line: 'C:\Apache24\bin\httpd.exe -d C:/Apache24'
[Sun Apr 13 19:32:50.550149 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00418: Parent: Created child process 6552
[Sun Apr 13 19:32:50.885418 2014] [mpm_winnt:notice] [pid 6552:tid 388] AH00354: Child: Starting 64 worker threads.
[Sun Apr 13 19:32:51.031514 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00428: Parent: child process 6552 exited with status 255 -- Restarting.
[Sun Apr 13 19:32:51.181935 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00455: Apache/2.4.9 (Win32) configured -- resuming normal operations
[Sun Apr 13 19:32:51.181935 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00456: Apache Lounge VC9 Server built: Mar 17 2014 19:17:53
[Sun Apr 13 19:32:51.181935 2014] [core:notice] [pid 1932:tid 416] AH00094: Command line: 'C:\Apache24\bin\httpd.exe -d C:/Apache24'
[Sun Apr 13 19:32:51.183934 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00418: Parent: Created child process 6580
[Sun Apr 13 19:32:51.532238 2014] [mpm_winnt:notice] [pid 6580:tid 668] AH00354: Child: Starting 64 worker threads.
[Sun Apr 13 19:32:53.098367 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00428: Parent: child process 6580 exited with status 255 -- Restarting.
[Sun Apr 13 19:32:53.185426 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00455: Apache/2.4.9 (Win32) configured -- resuming normal operations
[Sun Apr 13 19:32:53.185426 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00456: Apache Lounge VC9 Server built: Mar 17 2014 19:17:53
[Sun Apr 13 19:32:53.185426 2014] [core:notice] [pid 1932:tid 416] AH00094: Command line: 'C:\Apache24\bin\httpd.exe -d C:/Apache24'
[Sun Apr 13 19:32:53.187427 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00418: Parent: Created child process 6820
[Sun Apr 13 19:32:53.567752 2014] [mpm_winnt:notice] [pid 6820:tid 676] AH00354: Child: Starting 64 worker threads.
[Sun Apr 13 19:32:53.712849 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00428: Parent: child process 6820 exited with status 255 -- Restarting.
[Sun Apr 13 19:32:53.823924 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00455: Apache/2.4.9 (Win32) configured -- resuming normal operations
[Sun Apr 13 19:32:53.823924 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00456: Apache Lounge VC9 Server built: Mar 17 2014 19:17:53
[Sun Apr 13 19:32:53.823924 2014] [core:notice] [pid 1932:tid 416] AH00094: Command line: 'C:\Apache24\bin\httpd.exe -d C:/Apache24'
[Sun Apr 13 19:32:53.824925 2014] [mpm_winnt:notice] [pid 1932:tid 416] AH00418: Parent: Created child process 4068
[Sun Apr 13 19:32:54.201196 2014] [mpm_winnt:notice] [pid 4068:tid 640] AH00354: Child: Starting 64 worker threads.
More info from testing for anyone who is listening:
- syntactically correct php statements appearing before phpinfo () in file process OK
- syntactically correct php statements appearing after phpinfo () in file don't process, just the table is output
- a file that contains syntactically correct php statements but no phpinfo () returns The Web Page is not available'
- a file that contains syntactically incorrect php statements (e.g eco) and a phpinfo () returns the Web page is unavailable.
- Firefox and IE seem to process a valid php file containing phpinfo () but it quickly disappears from the screen and returns the server not found page (is this a clue?)
Still feel its something to with handling of errors but can't see anything in php.ini or apache 2.4 settings that would help me diagnose further.
Shall I give up and use XAMPP?
I tried to de/then reinstall Apache 2.4 and PHP 5.4 but it only made things worse!, so after a few more days of messing around, I deinstalled the lot and went with XAMPP which was quite straightforward to set up and seems to be working well....anyway, as far as my limited knowledge can tell. In hindsight I wish I had known about and used XAMPP from the start and saved myself alot of anguish, frustration and wasted time!.
Thanks & Rgds.
Most likely you spoiled some PHP syntax while removing phpinfo call.
Edit your php.ini again and set display_errors to on - this way you will see a syntax error message instead of generic error page.
Try to use the below code and check for error if there is any. It should work as shown below :
<?php
error_reporting(E_ALL);
$surname = "Mysurname"; $firstname = "Myfirstname";
echo $firstname . " " . $surname;
?>