skip to Main Content

I’m running into an issue with a website I’m managing. This is a wordpress site hosted from Bluehost’s hosting.

Every once and a while several pages on the site face a whole bunch of 409 errors. This is the main page that has been facing issues. Sometimes the files that fail to load are the css files. Which results in the page looking like this:
page with failed to load css

Sometimes the .js files are the ones which fail to load. That makes a host of other issues appear. Here’s a snapshot of the console when this happens:
enter image description here

A hard refresh, or clearing your browser cache usually fixes the issue. However my clients and customers don’t always know how to do this, and it shouldn’t be happening at all.

What’s super confusing is that it only happens some of the time. Although admittedly more often recently. This first started happening about two months ago.

Here’s What I’ve Tried

  1. I know that a 409 error indicates a conflict in targeted resource status. But the issue only shows up sometimes, not all the time.

  2. I know the paths to the resources are correct, because the pages load correctly sometimes.

  3. I’ve tried disabling plugins, uninstalling plugins, no success. The issue remains.

  4. I’ve tried changing the caching settings on the site. Even with no caching, the issue will occasionally pop up. I even prevented all .css file caching from the .httpaccess file, no help.

  5. I’ve gone through and fixed all PHP errors. Issue still shows up.

  6. The server isn’t showing any error messages in the server logs.

  7. I’ve gone through and repaired and optimized the SQL Database, didn’t help.

  8. I’ve improved the load time of the site by reducing images, only loading certain js files when needed. issue still shows up.

What’s more difficult is that it’s quite hard to test, as the issue only pops up sometimes, and other times I’m not sure if the issue is really happening, or if a customer has just cached the broken version of the site.

Any suggestions would help. I don’t have a lot of server knowledge, so I’m at a loss here.

2

Answers


  1. Although there’s no single solution to this problem, as you’ve already tried several fixes, here are some possible causes and targeted solutions:

    1. Strict security settings in server configurations could be a reason which might be blocking certain files sporadically. You can reach out to Bluehost support and ask if they have ModSecurity enabled or any specific firewall settings that could be causing these intermittent 409 errors.

    2. Since hard refresh often resolves the issue, you can set Cache-Control headers to refresh more frequently or remove caching headers temporarily to see if it resolve the issue. You can also try appending ?v=1.2 to resource URLs.

    3. WordPress can sometimes load stale resource files if their versions haven’t changed. You can try setting the version dynamically to ensure the latest version is loaded:

      wp_enqueue_style( 'your-style', get_stylesheet_uri(), array(), filemtime( get_stylesheet_directory() . '/style.css' ) );

    Login or Signup to reply.
  2. The 409 Conflict errors often indicate simultaneous updates to the same resource, possibly due to multiple requests competing to change it.

    Since you’ve ruled out caching, here are additional steps to consider:

    Database Locking: If two processes attempt to update the same database row simultaneously, it can cause conflicts. Check your database’s isolation level and consider implementing row-level locking if not already in place.

    ETags for Conditional Requests: Implement ETags on your API endpoints. Use If-Match headers in requests to prevent updates unless the client’s ETag matches the server’s, which can help prevent conflicts when multiple clients modify the same resource.

    Rate Limiting and Queueing: If there’s high traffic, consider introducing request throttling or queuing to control update requests and prevent conflicts due to overlapping operations.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search