Title: Plugin creates json and 505 errors
Last modified: August 4, 2023

---

# Plugin creates json and 505 errors

 *  Resolved [norte2017](https://wordpress.org/support/users/norte2017/)
 * (@norte2017)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/plugin-creates-a/)
 * Hi,
 * Thank you for your great work with pods. Really fantastic.
 * We are using pods in two websites, one in a linux server and one in a windows
   server, both pods 2.9.19 version, and both using wpml for translation.
 * After the last updates, the website in the windows server is going fine as always,
   even after recreating the pods fields database.
 * But something went wrong with the one in the linux server, after the last updates:
    - When deactivating pods, the website works fine, but without pods I can’t have
      my info displayed;
    - When activating pods, any changing and saving returns “The response is not
      a valid JSON response”. This happens with pods, pages, posts, and any other
      plugin;
    - Further, when visiting the website it returns a 505 error;
    - Resaving the permalinks, corrects the 505 error and the website is back, but
      jus for a while because when making changes follows on “The response is not
      a valid JSON response”.
    - Therefore, pods is now deactivated and I turned on maintenance mode.
 * For testing purposes, in the linux server, we installed a fresh website from 
   the ground: new database, new wordpress, new plugins (wpml, pods,….), but the“
   The response is not a valid JSON response” and the 505 appeared.
 * We also have contacted the hoster to check the linux server configuration, but
   the answer was: the problem is on your side.
 * Can you imagine why pods is causing such errors?
 * Should we change the website to a windows server?
 * Thank you for any clue or advise on this, as we are very worried after tons of
   work already made using pods. We can’t imagine going to other plugin.
 * Many thanks.
 * Rogerio
    -  This topic was modified 2 years, 10 months ago by [norte2017](https://wordpress.org/support/users/norte2017/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplugin-creates-a%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Support [pdclark](https://wordpress.org/support/users/pdclark/)
 * (@pdclark)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/plugin-creates-a/#post-16946989)
 * Hi Rogerio,
 * HTTP 505 would be a bit odd, as that specific code means that the server does
   not support the HTTP protocol version being requested by the browser. It usually
   indicates an out-of-date browser in use or a misconfigured proxy service, such
   as Cloudflare or Imunify360.
 * However, when I load the URL you provided, I get an error 500 (not 505), which
   is a generic server error, and I can see the site is not behind Cloudflare. With
   the information provided, I was able to verify some things, which may narrow 
   down the possibilities of what could be causing the error:
    - I can load [https://greenlines-institute.org/license.txt](https://greenlines-institute.org/license.txt)
      successfully and consistently in multiple browsers. This indicates that your
      HTTP server, which appears to be Nginx on Plesk, is working fine for static
      files, but not PHP.
    - [This article](https://www.plesk.com/blog/various/wordpress-500-internal-server-error/)
      indicates Plesk will return an error 500 is PHP hits an out-of-memory error,
      or if .htaccess or nginx.conf has errors, such as recursion.
    - If it is an out-of-memory error, see [this article on wp-config.php](https://developer.wordpress.org/apis/wp-config-php/#increasing-memory-allocated-to-php)
      and check the PHP error logs, which would indicate an out of memory error 
      from PHP and possibly a file responsible. The wp-config setting will only 
      modify the limit of what is allowed for an individual request — it will not
      change the amount of physical memory available for all processes. [This Plesk extension](https://docs.plesk.com/en-US/onyx/administrator-guide/server-administration/watchdog-system-monitoring-component/viewing-cpu-and-ram-usage-statistics.18320/)
      may be available and relevant for viewing memory usage. If not that, the CLI
      commands [`cat /proc/meminfo` or `free` or `vmstat` or `top`](https://phoenixnap.com/kb/linux-commands-check-memory-usage)
      might give you the relevant information.
    - I mention memory in particular because if I try to load [https://greenlines-institute.org/xyz](https://greenlines-institute.org/xyz),
      I am able to see a 404 page from the `maintenance` plugin, but only intermittently.
      Sometimes it indicates an error 500. This intermittent nature of the error
      again indicates a server under load or running out of memory. I can also load
      [https://greenlines-institute.org/en/](https://greenlines-institute.org/en/)
      with the same maintenance page displayed intermittently. As you indicated 
      maintenance is active and Pods is inactive, this indicates a general memory
      issue with the server, infinite redirects, background tasks running on Cron,
      or a combination of such things.
    - Regarding the connection to Permalinks and valid JSON responses: it is the
      case that Permalinks not being set will cause `/wp-json/` requests, such as
      Gutenberg and various plugins, to not work. But again, the intermittent issue
      points to memory — either due to load or a memory leak due to recursion or
      aggressive queries or other errors in logic.
 * Based on those items, here are some things I would look for:
    - First, check PHP and Nginx error logs to see if more relevant information,
      such as a path to a failing file, can be found. Also check Apache if it’s 
      running behind Nginx.
    - Check .htaccess and nginx.conf and Pods and WPML for any configurations that
      might result in infinite loops. e.g., non-default configurations, or URL mappings
      that might conflict with each other. For example, I see your home page redirects
      to `/en/`. If there is some HTTP server rewrite, custom post type, taxonomy,
      multisite, or other data structure existing in multiple plugin or code configurations
      that conflict in such a way as to cause an infinite loop, it would cause an
      out of memory error 500 very quickly. [Query Monitor](https://wordpress.org/plugins/query-monitor/)
      can be useful for analyzing what rewrite rules are registered, for example.
      It will also tell you how much time, memory, and how many database queries
      occur for a given page load. Keep in mind this metric is for one load of WordPress—
      the server’s total available memory divided by memory for one uncached load
      would be an indicator of how many simultaneous page loads it can bear without
      crashing. Some configurations of page loads, such as the maintenance page 
      with a 404 mentioned below, load WordPress multiple times.
    - Check your templates for potentially errant redirects or infinite loops. Testing
      with a default theme or disabling custom Pods templates one-by-one is a quick
      way to rule this out.
    - If all that fails, check for any background processes or aggressive queries
      that might be running intermittently or on catch-all actions such as `wp`,`
      init`, or `template_redirect`. As you’re having issues with REST responses,
      I’d suspect functions on the first two more than the third.
 * When attempting to analyze the site further, I was blocked for a period with 
   HTTP 403 from a service called `[Imunify360](https://www.imunify360.com)` (`imunify360-
   webshield/1.21`), so if searches for memory usage or infinite redirects don’t
   pan out, it might also be worth checking the logs of that firewall service. [Its documentation indicates](https://docs.imunify360.com/faq_and_known_issues/#_8-why-does-my-cpanel-with-litespeed-and-owasp-modsecurity-rule-set-trigger-500-error-on-all-web-pages-after-installing-imunify360)
   some configurations and conflicts can result in an error 500. If that service
   is running in Plesk, it’s also taking memory to operate.
 * Some final edge-case notes:
    - It’s running PHP 7.4.33. The end of life date for PHP 7.4 was November 28,
      2022. This means it is no longer updated for newly found vulnerabilities or
      errors. It might be worthwhile to try updating PHP.
    - XML-RPC is enabled. It’s usually prudent to disable this if you’re not using
      it, which you’re probably not, as it can be used by robots to automate login
      attempts, which consumes server resources, such as memory.
    - There’s no WordPress version being output by the 404 page. Unless this is 
      a behavior of the maintenance plugin, this might indicate the site running
      a security plugin, such as Wordfence, which could be a source of conflicts
      with the redirects or memory consumption.
    - If analysis leads to memory problems, and you’re not running an object cache
      such as Memcache, [Pods Alternative Cache](https://wordpress.org/plugins/pods-alternative-cache/)
      may help reduce memory usage.
    - This probably isn’t it, but the maintenance plugin the site is running has
      a setting which intentionally sends a `503 Service temporarily unavailable`
      HTTP error. Doesn’t seem like that would be the case, as it sometimes displays,
      but might as well check that it’s off.
    - Check for 404 occurring in templates. For example, the logo on the maintenance
      page is a 404. When a file 404s in WordPress with permalinks enabled, it causes
      the 404 template to load, which instantiates a additional HTTP and PHP threads
      to load WordPress to display that template. As your 404 template currently
      itself contains that 404, this would be an example of a possible infinite 
      loop that would only be mitigated by a browser choosing to not process HTML
      returned in response to a request for an image. At a minimum, every page load
      for the maintenance page and 404 page is loading WordPress twice. 404 should
      be cached to load as quickly as possible to conserve memory, as robots will
      often request random paths from web servers. If a web crawler were configured
      to parse HTML responses regardless of the type of file requested, such a configuration
      could query your site infinitely until either the server fails to respond 
      or the crawler hits a recursion limit.
    - If you are running any database writes on frontend page loads without user
      interaction, this will consume memory very quickly.
    - If your test site was installed on the same server that’s running the site
      with memory errors, the test site would still be on a server that’s running
      out of memory.
 * If all that doesn’t lead anywhere and you’re still at a loss, if you deploy a
   test instance to Digital Ocean with [Sail](https://sailed.io), it has a [performance profiler](https://sailed.io/kb/profile/)
   that will tell you exactly how much processing time and memory is used by every
   action, filter, and function for any analyzed page request. Doing that would 
   take some time, but the server resources for a test analysis are fairly inexpensive.
 *  Thread Starter [norte2017](https://wordpress.org/support/users/norte2017/)
 * (@norte2017)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/plugin-creates-a/#post-16947452)
 * Hi Paul,
 * thank you for your kind and detailed reply. Awesome. As I’m not a developer and
   having basic knoledge on wordpress it as quite impressive.
 * *Sorry, I wrote 505 but should have been 500.
 * Some details:
 * wp memory: 1024 M
 * Changed php version to alt-php82-fastcgi.
 * Activate debug but no errors registered.
 * Disabled xmlrpc.php.
 * Intalled pods cache.
 * Activated pods and it failed again: shows 500 and I can’t save anything without
   the json error to occur.
 * I’m with your oppinion, also suspect on some memory or some server misconfiguration.
 * Therefore, I’m insisting with the hoster to give me an answer.
 * Many thanks for your help.
 * Rogerio
 *  Plugin Support [pdclark](https://wordpress.org/support/users/pdclark/)
 * (@pdclark)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/plugin-creates-a/#post-16947468)
 * Since your configuration is specific to Pods + WPML, [here is an open issue on the Pods GitHub](https://github.com/pods-framework/pods/issues/4884)
   that gives an example complex query that may result, along with a possible resolution.
 * As multilingual sites are complex, such things will vary significantly depending
   on your configuration and templates, but that may help to get an idea of possible
   optimization that may be necessary, or reasons for increasing memory in general.
 * I can’t comment on WPML much further than that — in my limited experience with
   multilingual sites, I’ve generally had better luck with [Polylang](https://wordpress.org/plugins/polylang/),
   and more recently moved to a plugin of my own design that fits my limited use
   cases.
 * It’s also possible to [configure ML using a WP multisite](https://translatepress.com/wordpress-multisite-multilingual/)
   and [switch_to_blog()](https://developer.wordpress.org/reference/functions/switch_to_blog/)
   for necessary cross-site queries.
 * Much of this will change in the near future, as multilingual block editor support
   is slated for the [4th phase of the long-term Gutenberg roadmap](https://wordpress.org/about/roadmap/).
 *  Plugin Support [pdclark](https://wordpress.org/support/users/pdclark/)
 * (@pdclark)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/plugin-creates-a/#post-16947560)
 * Great, thanks for the response and follow-up. One note on this line:
 * > wp memory: 1024 M
 * This may not be what an actual page view is consuming — see Query Monitor or 
   Sail or [memory_get_peak_usage()](https://www.php.net/manual/en/function.memory-get-peak-usage.php)
   for that — but it does mean one inefficient page load could consume up to 1GB
   of of physical RAM before shutting down; loading an admin page could easily take
   up to 4GB+ for one view if admin-ajax or wp-json were hit just a few times with
   inefficient queries. Check actual memory usage in Plesk — you may find that the
   server container itself is running out of resources.
 * Glad to hear PHP has been upgraded to 8.2 :). Also consider [how many PHP threads Fast CGI is allowed to spin up](https://stackoverflow.com/q/5829869).
   e.g., if there’s an inefficient query or two in there, each individual thread
   could consume up to 1GB before shutting down; easily overwhelming the server 
   if not identified and optimized.
 * It’s not difficult to run into such resource limits if queries are running across
   many languages, post types, and fields to generate a complex layout! Proactive
   caching can help, but sometimes complex queries have to be identified and optimized
   to get things working on servers with limited resources.
 * I’m not familiar with the details of your specific host, but Plesk usually means
   a VPS, which has hard memory limits. Even if it’s dedicated hardware, the physical
   RAM runs out at some number. [Some WordPress hosts make it possible to auto-scale available resources](https://www.google.com/search?q=wordpress+host+%22How+to+set+up+a+cloud+server+to+autoscale),
   if it’s easier to throw hardware at the problem than it is to debug the specific
   queries, templates, and data models.
 *  Thread Starter [norte2017](https://wordpress.org/support/users/norte2017/)
 * (@norte2017)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/plugin-creates-a/#post-16947620)
 * Hi Paul,
 * it’s out of my boundaries to get deeper on this.
 * I’m waiting the hoster response, and probably migrate to a more stable and updated
   service. If our other website that is hosted in a windows plesk server which 
   is running a quite heavy pods structure with wpml without any errors , that should
   be considerer as a reference for the server configuration.
 * Your support was amazing, thank you once more.
 * Greetings,
 * Rogerio
 *  Plugin Support [pdclark](https://wordpress.org/support/users/pdclark/)
 * (@pdclark)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/plugin-creates-a/#post-16947645)
 * Alright good luck! With any luck there may be a host willing to migrate it to
   a new environment on your behalf.
 *  Thread Starter [norte2017](https://wordpress.org/support/users/norte2017/)
 * (@norte2017)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/plugin-creates-a/#post-16947705)
 * There will be no problem, they will do the migration to another server managed
   by them.
 * Just one more question, if I may.
 * Is the following ok:
 *     ```wp-block-code
       Debug information for Pods installations.Server Software ApacheYour User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0Session Save Path /opt/alt/php73/var/lib/php/sessionSession Save Path Exists YesSession Save Path Writeable YesSession Max Lifetime 1440Opcode Cache: Apc NoOpcode Cache: Memcached NoOpcode Cache: OPcache NoOpcode Cache: Redis NoObject Cache: APC NoObject Cache: APCu NoObject Cache: Memcache NoObject Cache: Memcached NoObject Cache: Redis NoCurrent Memory Usage 107.023M / 1024MCurrent Memory Usage (real) 23.000MPods Network-Wide Activated NoPods Install Location /wp-content/plugins/pods/Pods Developer Activated NoPods Tableless Mode Activated NoPods Relationship Table Enabled YesPods Relationship Table Count 229Pods Light Mode Activated NoPods Strict Activated NoPods Allow Deprecated YesPods API Cache Activated YesPods Shortcode Allow Evaluate Tags NoPods Sessions Disable sessionsPods Can Use Sessions YesSetting: Types only NoSetting: Watch Changed fields YesSetting: Watch WP Metadata calls YesSetting: Override WP Metadata values Yes
       ```
   
 * Thank you.
 *  Plugin Support [pdclark](https://wordpress.org/support/users/pdclark/)
 * (@pdclark)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/plugin-creates-a/#post-16947731)
    - Those last 3 options can be configured under Pods Admin > Settings > Performance.
      Turning off the filtering of meta etc makes things run much more efficiently
      if they’re not needed.
    - Everything does better with an Object Cache, but you’ve installed Pods Alternative
      Cache which does much of the same work.
    - Everything else looks normal to me.
 *  Thread Starter [norte2017](https://wordpress.org/support/users/norte2017/)
 * (@norte2017)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/plugin-creates-a/#post-16947826)
 * Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Plugin creates json and 505 errors’ is closed to new replies.

 * ![](https://ps.w.org/pods/assets/icon.svg?rev=3286397)
 * [Pods - Custom Content Types and Fields](https://wordpress.org/plugins/pods/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pods/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pods/)
 * [Active Topics](https://wordpress.org/support/plugin/pods/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pods/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pods/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [norte2017](https://wordpress.org/support/users/norte2017/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/plugin-creates-a/#post-16947826)
 * Status: resolved