Hi, I've a view with custom search with AJAX update results on filter change.
The filter doesn't work well, most of the times I'm getting this error in the console:
POST ../wp-admin/admin-ajax.php 503
I tried deactivating some plugins, but I didn't find any clear conflict.
Any idea?
Hi,
Thank you for contacting us and I'd be happy to assist.
The 503 Service Unavailable server error response code indicates that the server is not ready to handle the request.
( source: hidden link )
This doesn't necessarily have to be related to the code conflict and most likely could be due to server limitations or security measures that would restrict frequent AJAX requests.
Have you checked the server's error logs, after turning on WordPress debugging?
( ref: https://wordpress.org/support/article/debugging-in-wordpress/ )
In case the issue still persists, with all non-Toolset plugins disabled and a default theme like Twenty Twenty-One, it would be a good idea to test the website's clone on a different server.
I hope this helps and please let me know how it goes.
regards,
Waqar
Hi, I'm getting the problem on this page /mis-denuncias/. I asked the server to check the problem they send me an X-Ray monitoring report, where it seems that CRED and Blocks are using a lot of the server resources:
Top 2 issues
Issue name Type Duration (%)
Wordpress/cred-frontend-editor Module/Plugin 33.617 % (3431.203 ms)
Wordpress/toolset-blocks Module/Plugin 33.001 % (3368.343 ms)
I've uploaded the full report to the root of the site:
.../residuocero/xray-report-03.23.2021_at_11_20-request_57.pdf
The view I've built displays a Cred form for each post, I found that if I remove it, I'm not getting the AJAX error.
Please, can you check it?
thanks
Thank you for sharing these details.
The X-Ray monitoring report is not very useful in this case, since it doesn't provide specific information about at which point or operation the server's resources are spiked.
As a general observation, the view "Denuncias - lista Admin" is set to show 25 results per page and the pagination and search results are both set to update the results using the AJAX. This makes the overall processing, very demanding.
Can you test this search with a lower number of results per page value (for example 10), and also by setting the view's pagination and the search to update with a page reload and not AJAX?
I would also reiterate my suggestion from the last message about turning debugging on and then checking the error log, for the specific details about where exactly server resources are exhausting.
Additionally, if you'll go to WP Admin -> Tools -> Site Health -> Info (tab), you'll find under the "Server" section that:
- PHP time limit is set to 300, which should be increased to at least 600.
- PHP memory limit is set to 256M, which should be increased to at least 512M.
- PHP post max size is set to 128M, which should be increased to at least 256M.
Note: if any PHP directive constants have been defined, in your website's "wp-config.php" file, please also update them accordingly.