YorkData
asked on
IIS Web Server PHP slow load times - cookie related
We currently have a pair of IIS servers using NLB to load balance web requests. We are currently having an issue with one of the servers where it takes a long time on the first visit for the time to first byte. On a repeat visit the load time loads within a normal time.
We have narrowed it down creating the session cookie. If we remove the cookie from the browser the web page takes a long time to load, but when the cookie is already there the page loads normally.
Thanks in advance
Oliver.
We have narrowed it down creating the session cookie. If we remove the cookie from the browser the web page takes a long time to load, but when the cookie is already there the page loads normally.
Thanks in advance
Oliver.
ASKER
Ok so we have pinpointed it to the session files not being destroyed.. It ended up with 2million session files in folder which was fun to delete.
I've checked permisisons on both IIS servers and they are exactly the same, the files themselves have exactly the same permission also but I can see the session files are still not being removed.
Any clues? We run each website with its own user which is in the permissions of the file.
Thanks.
I've checked permisisons on both IIS servers and they are exactly the same, the files themselves have exactly the same permission also but I can see the session files are still not being removed.
Any clues? We run each website with its own user which is in the permissions of the file.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks. One side note - if you're using FastCGI, then it's likely running as its own process. If the user running that FastCGI process doesn't have full privileges to the temp folder where the sessions are stored, then it might be unable to remove those sessions. You really shouldn't have to manually clean up files.
ASKER
my solution also resolved the issue.
Also, check your php.ini file and find out where your session files are being stored. Then create a standalone PHP script that tries to create a new file in that same folder and see if it takes a long time to do so.