WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Intermittent Image Url Corruption (6 posts)

  1. sphoid
    Member
    Posted 2 years ago #

    We are running into a strange problem where intermittently all of the image src attributes are corrupted. Instead of referencing the real url of the image it references the image at it's full file system path. So instead of "http://mysite.com/wp-content/uploads/2011/01/someimage.jpg" I get something like "http://mysite.com/var/www/html/wp-content/uploads/2011/01/someimage.jpg" or often it will nest repeatedly and I will get something like "http://mysite.com/var/www/html/wp-content/uploads/var/www/html/wp-content/uploads/2011/01/someimage.jpg". This will happen for several minutes and will magically go back to normal. Obviously this results in all of my images being broken while this is occuring. This glitch happens at seemingly random times, sometimes it happens frequently, several times a day, other times it won't happen for days or even weeks.

    We are using W3 Total Cache with a cdn so that plugin does a search and replace on those image sources so they point to something like "http://cdn.mysite.com/wp-content/uploads/2011/01/someimage.jpg". At first I thought it was causing the issue but after adding some trace statements it seems to happen before W3 even gets a chance to process the output buffer. I may be mistaken but it seems like its happening from within wordpress itself.

    Has anyone experienced this or does anyone have any suggestions of how to troubleshoot this.

  2. briscoe
    Member
    Posted 2 years ago #

    Hi There, I realize it's been a couple months, but I just made some updates to my wordpress install and now my thumbnail images are all doing this same thing.

    Did you figure out what the cause/resolution to this issue was?

  3. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    Are you using an image/gallery plugin with W3? If so, which one(s)?

  4. sphoid
    Member
    Posted 2 years ago #

    We haven't fully solved this but we have narrowed it down considerably. The symptom is intermittently calls to get_option('siteurl') return nothing instead of the value that's in the database. This causes functions that build urls to go completely haywire obviously. We've narrowed it down to a condition in the mysql server where queries are not returning in a timely manner resulting in corrupt data being returned by get_option which in turn gets cached and causes all hell to break loose until we flush the cache.

  5. Frederick Townes
    Member
    Posted 2 years ago #

    Are there any errors in the web server error log when this occurs?

  6. sphoid
    Member
    Posted 2 years ago #

    I forgot to come back and resolve this but it turns out the problem was an incompatibility or bug in the memcached daemon. Upgrading to the latest version resolved our issues with our object cache getting corrupted. I Also downgraded the php-memcache to a stable version before that which improved things substantially.

Topic Closed

This topic has been closed to new replies.

About this Topic