Hope I've posted this question in the right place.
I'm having big issues with WPE crashing - had it on 12 and was hoping that 13 might fix it - seemed to run OK for a bit and then the same old crashes started during periods of increased web activity.
====== The Set-up =====
I've got FMSv13 running on a new mac mini server 10.9.1 with 8GB RAM (512 allocated to DB)
Running 4 databases with 25 FMPro clients.
No other software is installed (no AV, no Server)
Web Publishing is enabled, but PHP, Webdirect and XML are all turned off
Connecting to this server are two web servers via PHP API (the new FM13 version). Both are on the same network. One is an intranet for the staff to view the jobs and the other has external access for clients to access their jobs.
The web pages have more than one FileMaker request in each page (there is a secuirty section to pass before the web page is served up).
Both machines are OS X 10.9, they are running PHP 5.4.17 amd Apache 2.2.24
Each machine uses a different account name to access FileMaker.
Max web clients is set to 200
======= The Problem ======
There are no issues on the FMPro side - everything is stable, all the issues are related to the WPE.
The WPE gets swamped by requests and the web becomes unresponsive.
When this happens, there are approx 200 web clients showing in the client activity list, and the RAM allocation to WPE sky rockets.
Normally there are 2 web clients - one called IntranetDataUser and another called clientDataUser - this is to make sure that the same client account is not called from a different IP as I know that this can be an issue for WPE
I've done a lot of testing to replicate the problem. At the weekend I turned off the Intranet server and set 4 machines to randomly load one of 10 web pages from the client server every 20 seconds. All runs fine for a while and then all of a sudden more clients appear in the activity list (all the same useranme), and then it snowballs, the client number hits 200 and the memory goes up, 1GB, 2GB etc
So I increased the number of client sessions to 2000. After a while there were 2000 web clients in my activity list and the WPE was over 4GB.
If I turn off the web server it takes 3 minutes for all the client web sessions to disappear.
I tried it with 2 machines, seemed to run OK, then with 10 machines it also ran OK for a bit. A few times there were 3 or 4 clients, and then it went mad again.
======== The Question ======
Why is the WPE hanging onto the requests for 3 minutes? Is it waiting for a reponse from the PHP API on the web server?
When coding PHP and MySQL, at the end of the MqSQL data request I set it to NULL,
$db = new PDO( etc...
$db = NULL;
As far as I know this closes the connection and tells the database server to move onto other requests.
Is there a command for the PHP API that has the same effect?
Thanks for any light that anyone can shed on this issue.