Re: PHP - only seems to run one instance?
March 17, 2015 07:42PM
So reading those, they are saying to increase the timeout time, 60 seconds loading a page on this type of server when only I have access isn't a timeout that should happen.

The other recommendations are to simply use 127.0.0.1 for the php proxy (so ip4) which mine already is doing.

I will keep looking bit as it stands, I am lost
Re: PHP - only seems to run one instance?
March 17, 2015 07:53PM
It can be anything from 'bad' programming to ipv6/ipv4/local-dns issues... but its not nginx but the backend(s), try a simple phpbb installation and pound that with many users as a test.

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: PHP - only seems to run one instance?
March 17, 2015 07:56PM
I get the error even loading up basic pages which just a simple echo
Re: PHP - only seems to run one instance?
March 17, 2015 08:12PM
This may sound daft but do you think it may be an issue with it being connected to itself.

So my server is on my machine, I can access it using my local ip, but it has domains bound to it. I always connect to it using either an external domain which then connects back to the server so

Pc - domain - router - server

I'm entirely sure as if I do random connections from my mobile while is a different Internet connection, it seems to work fine but then again, it's not a large amount of connections
Re: PHP - only seems to run one instance?
March 18, 2015 05:02AM
No idea without having a look on the system, could be a loopback somewhere, try a simple "<?php phpinfo();?>" to emulate some load on the loadbalancer.

Hangon, domains which go back outside and back in? edit your /windows/systems32/drivers/etc/host file and add those domains with the local ip,
192.168.222.111 www.mydomain.com
so it does not go through the router anymore.

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: PHP - only seems to run one instance?
March 18, 2015 05:29AM
Yes that's what I have thinking. That maybe my router is detecting a full loop back and rejecting the connections in the firewall thinking it may be a network attack.

I can set a wildcard in this domains can't I? So any sub-domain goes to the same aswell?

Again thanks for all your help so far
Re: PHP - only seems to run one instance?
March 18, 2015 05:34AM
bigjme Wrote:
-------------------------------------------------------
> Yes that's what I have thinking. That maybe my router is detecting a
> full loop back and rejecting the connections in the firewall thinking
> it may be a network attack.
>
> I can set a wildcard in this domains can't I? So any sub-domain goes
> to the same aswell?
>
> Again thanks for all your help so far


No wildcards are not supported by the host file so for the time being you will have to add all you use.

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: PHP - only seems to run one instance?
March 18, 2015 03:17PM
Ok, thanks.

I may look at setting us a dns server on my dev machine to save the reboot each time i change the host files
Re: PHP - only seems to run one instance?
March 18, 2015 03:27PM
bigjme Wrote:
-------------------------------------------------------
> Ok, thanks.
>
> I may look at setting us a dns server on my dev machine to save the
> reboot each time i change the host files

No need for that, the effect is immediate, most likely your browser needs restarting. (check with a ping)
But if your looking for a good local dns see Dual DHCP DNS Server.

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: PHP - only seems to run one instance?
March 18, 2015 04:35PM
Thank you very much for your help :)

I used one of my developed sites at work today without any issues so it seems the error was because of me doing a full loop back to my system

Regards,
Jamie
Re: PHP - only seems to run one instance?
March 23, 2015 02:57PM
So today i got round to setting up my local DNS server. i set up all my domains to point to 127.0.0.1 so they never get past my actual machine, i then tried accessing one to make sure it was going to the right ip and it was. But i still get the long times without a server reply. So it cant be my firewall blocking it now
Re: PHP - only seems to run one instance?
March 23, 2015 03:19PM
In your php code insert some code that logs the request time, run time and reply time to see if a request is actually consuming time inside php. If you can conclude its delaying inside php code we can exclude nginx and search down the php line.

If its not php then compare the php logging you just made with nginx logging, if there are delays between nginx sending a request and php receiving them we can look there.

Etc.... without logging/testing at this level it will remain guesswork.

nb. maybe a local antivirus with firewall active?

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: PHP - only seems to run one instance?
March 23, 2015 05:11PM
So i just created a logging script that can log all my request to php files, images, everything.

I just ran a few loads and got the server to fail a few times. Here is a start and end time for a single page load, but for 4 files being loaded

2015-03-23 21:05:24 - Start
0.011250019073486 - Run Time in Seconds
2015-03-23 21:05:24 - End

2015-03-23 21:05:24 - Start
0.0024559497833252 - Run Time in Seconds
2015-03-23 21:05:24 - End

2015-03-23 21:05:24 - Start
0.0021560192108154 - Run Time in Seconds
2015-03-23 21:05:24 - End


2015-03-23 21:05:24 - Start
0.0031940937042236 - Run Time in Seconds
2015-03-23 21:05:24 - End


The 4th file which finished executing and logged its time was reported as "ERR_CONNECTION_RESET" by the web browser (Chrome).
So PHP ran the file and executed it fine, but the server reset the connection? I had the same with some pages stating connection errors and that the server did not respond however the script logged the accesses perfectly (the database insert runs at the very bottom of the page) so im not sure what it may be

Regards,
Jamie
Re: PHP - only seems to run one instance?
March 23, 2015 05:36PM
I was just able to monitor one of the slowdowns, this time it got as response eventually. So i screenshot the request and the database entries to go with it.

The database entry was not added until the main page responded. Normally the requests never get a reply at all.
Attachments:
open | download - log.png (73.7 KB)
Re: PHP - only seems to run one instance?
March 23, 2015 05:59PM
bigjme Wrote:
-------------------------------------------------------
> as "ERR_CONNECTION_RESET" by the web browser (Chrome).
> So PHP ran the file and executed it fine, but the server reset the

Google "err_connection_reset php"

http://serverfault.com/questions/494818/error-101-neterr-connection-reset-the-connection-was-reset-while-selecting
https://maxqubit.wordpress.com/2012/07/04/error-101-neterr_connection_reset-the-connection-was-reset/

Looks like a generic pc-tcp issue.

---
nginx for Windows http://nginx-win.ecsds.eu/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 107
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready