Increasing the FM Data API's timeout
Table of Contents:
Increasing the FM Data API's timeout
This isn't well-documented officially, but it's relevant to some 360Works customers whose databases are large and complex, as our scripts can take longer than 5 minutes to run in rare cases.
By default, the FileMaker Data API has a 5-minute timeout (300 seconds) for long-running requests, after that it will return an error. To increase this timeout, follow the steps below.
Even after you increase this, long-running requests may run into web server timeouts instead. Read your web server's documentation to find out how to increase those.
1. Locate the wpe.prefs
File
Open the wpe.prefs
configuration file located by default at:
- Windows:
C:\Program Files\FileMaker\FileMaker Server\Web Publishing\publishing-engine\conf\wpe.prefs
- macOS:
/Library/FileMaker Server/Web Publishing/publishing-engine/conf/wpe.prefs
- Ubuntu:
/opt/FileMaker/FileMaker Server/Web Publishing/publishing-engine/conf/wpe.prefs
1b. (Optional) Back up your original configuration file
Make a copy of this file in the same folder called wpe.prefs.backup
(or whatever you prefer). If for some reason your web server won't start after this change is made, you can use this to revert back to the previous contents of the file.
2. Add the Timeout Configuration Line
Add the following line to the file, or modify it if it's already there:
server/parameters/config/wip-timeout-secs=600
Replace 600
with your desired timeout value in seconds.
Note that many of our products have a default internal timeout of 360 or 720 seconds for API requests. If you want a build of one of our products with this timeout expanded, please email us.
3. Save the File
Save the wpe.prefs
file after making the change.
4. Restart the Data API
Restart the Data API service and the web server using the following commands:
fmsadmin restart fmdapi -y
fmsadmin restart httpserver -y
You may need administrative privileges to run this command.
After completing these steps, the new timeout will take effect. You can verify the change by running long-duration Data API requests and observing the timeout behavior.