Skip Navigation

[Resolved] Custom search error admin-ajax 503

This support ticket is created 3 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Waqar 3 years, 8 months ago.

Assisted by: Waqar.

Author
Posts
#1990791

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?

#1991759

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

#1997723

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

#1999067

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.