Snapshot internal server error on first run

Using Snapshot Pro for the first time on this host, I'm trying to save locally. Had set up Dropbox for saving there if when I got local back up working.

I got a "Internal Server Error" on two attempts. It happens after the DB back up and during the files/plugins backup.

Here's a link to relevant screen shots and detail:
https://www.evernote.com/l/AAQbUmWOdwZEfLRGzTzUGZQvrTYNqlzMgBo

Any suggestions what might be causing it and what I can do to resolve it?

  • Adam Czajczyk

    Hey Morgan,

    I hope you're having a great day and thank you for your question!

    The "Internal Server Error" (usually known as "500 Internal Server Error") is pretty much undefined, unfortunately. The good thing though is that you included the memory limit/usage information in your screenshot. As the the memory limit is quite a common reason for this error, here we can rule it out :slight_smile:

    That being said, please go to your dashboard's

    "Snapshot" -> "Settings" page

    and try changing a "Segment Size" option value. If it's set to more than 1000, make it 1000. If it's already 1000, try either making it 500 or 5000. This is a "trial and error" process but since there's no single, universal server configuration I'm not able to give you a "ready-to-go" value.

    Also, please check if the /wp-content/uploads folder is writeable. You should find this info on the very same page inside a "Server Info" settings.

    Let me know if it helped, please!

    Cheers,
    Adam

  • Morgan

    Hello Adam,
    Thanks for the very fast response. I tried changing a few limits as suggested, but no luck. I'm pretty sure it's something in the plugins folder. I got a successful backup when I excluded plugins. The backup failed when I excluded everything but plugins.

    I've updated the note at this link with screen shots.
    https://www.evernote.com/l/AAQbUmWOdwZEfLRGzTzUGZQvrTYNqlzMgBo

    I think files in the plugins folder are set to 644.
    Regards,
    Morgan

  • Adam Czajczyk

    Hey Morgan,

    Thanks for new information, this definitely gets us somewhere nearer the solution. I can see two possible reasons for the error.

    1. This might be indeed a matter of folder/file permission. I've mentioned it previously but in regard to /wp-content/uploads folder. You may want to change /plugins/ folder permissions to 744 or 755 if this doesn't work.

    2. If above doesn't help it may be as well a known php bug as seen here:
    https://bugs.php.net/bug.php?id=66474

    In this case the solution would most likely be to either switch to a newer PHP release (if it's below 5.5.x version) if you are able to do it via your server's control panel or to ask your hosting provider to do this.

    Let me know how it went!

    Cheers,
    Adam

  • Adam Czajczyk

    Hey Morgan,

    Thanks for this information.

    I'd give permissions one more try. For me (on my test setup) this works on even lower permissions but according to the error nature this might work other way on other servers. That said, I'd try setting 655 (and if it doesn't help then 755) for files and you should be able to easily do this with your FTP client software.

    I'm not quite able to give you a step by step instruction here, unless you tell me what's your FTP client of choice but I'm sure there's an info in this on the web.

    If this won't help, I'd like to take a closer look at your site. I'd need an access to your dashboard for this, so would you please kindly grant me an access by following this guide:

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Cheers,
    Adam

  • Predrag Dubajic

    Hey Morgan,

    I tried doing some testing on your site but navigating through your admin section takes really long time and now I'm presented with Error 520.
    Note that all changes I tried is changing snapshot archive method and tried creating new snapshot.

    I also noticed a lot of hidden files in the plugins folder. I'm not sure if that's normal, or whether they could affect things. Theres .htaccess, some .git* files and others.

    Your .htaccess is usually located in root WP folder and it shouldn't be in more than one place in your WP installation.
    Is the .git folder located in your plugins folder?
    Can you try removing it from plugin folder and try creating snapshot then?

    Best regards,
    Predrag

  • Morgan

    Hello,
    Thanks for the quick reply. The site speed is a parallel problem I'm trying to figure out. The dot files I mentioned were all found in various plugin folders when I searched /plugins using Filezilla. I didn't know if they were supposed to be there so didn't want to delete them. Is it OK to delete the .htaccess and .git files that are in the plugin folders? These were presumably installed with the plugins, maybe left behind by the developers before release?

  • Adam Czajczyk

    Hey Morgan!

    The ".htaccess" and ".git" files inside the plugins folder is a most unusual issue. Sure, sometimes there are some development "leftovers" but I'm finding this quite strange that there's more of those.

    You can safely remove all the .git files and removing .htaccess files from plugins folder also shouldn't do any harm. As my colleague @Predrag Dubajic said, .htaccess should only be placed in your install root folder.

    That said, please make a backup copy of your files "just in case" and then remove those files and let me know if it helped either in speeding up the site and/or Snapshot issue.

    Cheers,
    Adam

  • Morgan

    Hello,
    An update. I copied the site to a separate environment at the same host to give me a little more freedom to test things. I removed the DOT files as previously discussed, but there is mention in the codex of .htaccess on a per directory basis, usually for security reasons. The .DStore files probably don't need to be there though...

    The problem with Snapshot continued after deactivating all plugins, so I removed them and added them one at a time. The problem returned when I added Intense Shortcode 2.5.1. When combined with Visual Composer, the whole site slows down, Snapshot does not finish and P3 plugin freezes while scanning. I went back and removed all plugins again, added only Snapshot, P3 and Intense, and replicated the problems.

    The host service is not great, but I think that just makes a software problem more apparent; I don't think it's the core problem. I got this plugin through a theme and I think we're a few minor versions behind the current one. I've seen mention in Intense forums of a memory bug they were working on 3-12 months ago.

    Unless I can find another solution, I will probably have to remove all the Intense shortcodes in my theme. With Intense uninstalled, but all other plugins left in place, I'm getting acceptable (though not great) speed on the test site without any optimisation (prob 1-2s page load). With Intense installed, Snapshot and P3 won't run and page load is consistently 15-30s, both front and back end. Monitoring memory, it hovers around 50-60mb for page loads and P3 scans, with a 256mb limit. During a Snapshot backup, it's usually around 80MB, never higher than 160mb.

    Doing test runs of Snapshot to backup the plugins folder only, with Intense removed, works fine. Unfortunately, I'm getting repeated 504 Gateway Time-out when I create a Snapshot to backup everything. This is a new site, so everything is not a lot, DB around 20mb and a site zip file of no more than 250mb. Strangely, it always stops at the same place (same as with Intense installed) at 75% on backing up plugins. The script timeout is set in wp-config to 360. I'm not sure how to check if the server is paying attention to the limits I set for time and memory.

    Also, when running P3 plugin scans each time after adding a new plugin, I noticed that Ultimate Facebook seems to take up a lot of the pie graph, sometimes over 50% for around 20 active plugins. It seems odd given there's no one using the site except me. Everything I described above happened without the Facebook plugin being installed, so it's a separate issue.

    Anyway, I'm looking for any alternatives to discarding Intense Shortcodes or moving to another hosting service.

    Regards,
    Morgan

  • Adam Czajczyk

    Hey Morgan,

    Thank you for this extensive description of a case, that's really helpful!

    I'm not much familiar with Intense Shortcode plugin but I'm well aware of how much resources these "all-in-one" plugins may consume and probably the visual builder is a big "resource eater" here to, as it usually is.

    This being said you can always try to rise memory limits and script execution time, however there's always "limit to the limit" and it's also a common practice of hosting providers to cut on resources every once in a while, especially after the sudden "jump of consumption".

    Having said that, disabling Intense Shortcode and Visual Composer - as you already did - might be the only reasonable solution here, except server replacement.

    As for Ultimate Facebook. I've let myself visit your dashboard and take a look at the sites settings. I couldn't spot anything even slightly unusual with the Ultimate Facebook configuration, however that's very likely that all the scripts loaded "for Facebook from Facebook" are causing this.

    Is there any place on your front-end page(s) where I could test Ultimate Facebook's features? Please advise!

    Cheers,
    Adam

  • Morgan

    Hello,
    At the moment, wp-config sets memory at 256 and execution time to 360. I believe these limits are at or higher than suggestions for the Snapshot and P3 plugins.

    I've like to find some way to benchmark the host without SSH. The host allows SSH (no root, not sure what I can install), but I need to send in a form and it could take a while to set up.

    I've found an article on dd for benchmarking, but would like something that can tell me what CPU/RAM is available and how much my site is using with different plugins installed. Would like to see whether host is allowing me the resources that wp-config requests.

    As for Facebook, I think the only features enabled are the SSO and synchronisation with comments. I have Comments+ installed and not sure whether the two overlap. It might be possible to remove Ultimate Facebook in favour of a social media signin plugin.

    As a general question, I was wondering if the WPMU social media plugins are designed to load last (deferred or asynch). Because they are regularly accessing other sites, there seems a lot of potential to cause bottlenecks.

  • Adam Czajczyk

    Hey Morgan,

    I hope you're well today!

    There's a plugin for server benchmarking, however I'm not sure if it will do the job as it hasn't been updated in over 2 years. You may want to give it a try though:

    https://pl.wordpress.org/plugins/benchmark/

    Very simple PHP benchmark can be also performed with this script:
    http://www.php-benchmark-script.com

    To find more information about your server you may want to dig a little deeper inside your server's admin panel. If you're using cPanel or DirectAdmin there should be "stats" regarding server's configuration.

    For cPanel these should be available either at the bottom of the left column (you may need to expand the list) or via an icon.

    For Direct admin, you need to select any domain after login, scroll down 'till "Advanced options" section and use a "Server information" link.

    As for the way the scripts are loaded by our social plugins. The only thing I can tell you right now is that for sure the code is designed following the Facebook's (and other social platforms') codex/dev standards. We care a lot for these things. Unfortunately, it's a weekend day today and there's no many developers around to be asked more detailed questions. However, I'll let you know as soon as I get the replay from our dev team.

    Cheers,
    Adam

  • Morgan

    Hello,
    It was quite exciting to try out some benchmarking on this server. Unfortunately, the results were mixed. I didn't get a consistently 'good' or 'bad' message from it. DB query speed was quite poor.

    https://www.evernote.com/l/AARszXGvRD5POJpqbnIEC1_C5HvO2fnxG0o
    https://www.evernote.com/l/AATqkiORcOVNBJc4MPr9pofnuygWjKO7j8g

    I'm not sure what to make of the PHP script. I have little to compare it with.
    --------------------------------------
    | PHP BENCHMARK SCRIPT |
    --------------------------------------
    Start : 2015-06-14 17:36:40
    Server : theaviary.net@10.0.1.33
    PHP version : 5.5.20
    Platform : Linux
    --------------------------------------
    test_math : 2.126 sec.
    test_stringmanipulation : 2.405 sec.
    test_loops : 1.916 sec.
    test_ifelse : 1.394 sec.
    --------------------------------------
    Total time: : 7.841 sec.

    I've managed to remove all the Intense Shortcodes from my site, and it runs better. It's moderately faster, but only from unacceptable to bearable. I am able to run P3 to measure plugins, but am not sure what to make of those results. It appears Comments+ is taking up a lot of time, but results vary quite a bit from test to test.

    Since removing Intense, SnapshotPro will run without freezing. However, I still get 504 errors about server not responding (and sometimes 520). This is a local shapshot, I'm not saving the backup to Dropbox or elsewhere. It always stops about 75% through backing up the plugins folder (both when it froze and with this 504 error).

    This site will eventually have MarketPress or WooCommerce running on it. It's already pretty slow and I don't know what kind of extra demands ecommerce will place on it. If the hosting service is not up to it, then I should start looking for an alternative.

    I can leave support access on if it helps to have a look.

  • Adam Czajczyk

    Hey Morgan!

    Thank you for this report!

    It seems like the DB is indeed quite slow here and this may be our bottleneck that we're looking for if it comes to a site speed. So far, the caching plugin could be a partial solution. The most popular are:

    W3 Total Cache
    https://wordpress.org/plugins/w3-total-cache/

    WP Super Cache
    https://wordpress.org/plugins/wp-super-cache/

    However, I'd like to take another look at your site and server, a closer look this time. Could you please send in:

    Subject: "Attn: Adam Czajczyk"

    - your site's WordPress admin login URL
    - admin login and password (may be a temporary account)
    - FTP credentials (hostname, username, password, port number if needed)
    - login url, login and password to your server's admin panel
    - any other relevant URLs and information
    - link back to this thread

    Please use our contact form here
    https://premium.wpmudev.org/contact/.

    Select "I have a different question" from the drop-down list.

    Please be sure to make a full backup copy of your entire site first!

    Cheers,
    Adam

  • Morgan

    Hello Adam,
    Thanks for your reply. I've sent the info you requested. Unfortunately, the problem we're discussing affects SnapshotPro, so I haven't got a current back up.

    Before starting this thread, I had tried W3TC and SuperCache and a few other options. Some sped things up, but broke the page. Others didn't show a big speed improvement, but I wasn't sure if I'd configured them correctly. I tried these with Intense installed and it's possible they will work better now that I've removed it.

    Based on a discussion on the site for the theme I'm using, I've installed Zencache and Autoptimize, which appear to be working along with Cloudflare. I still need to work out the critical path CSS and try out Lazy Load for images.

  • Adam Czajczyk

    Hey Morgan,

    I hope you're well today and I'm sorry for the delay on my side.

    I've been trying to login to your site and your server's control panel using the credentials you sent me but neither the site nor the control panel let me in. It's possible that the access you've created for me has already expired?

    Apart from the delay for which I do apologize, I still need to take a closer look to solve this. Would you please be so kind and double check the data you sent me and - if you confirm that's not working - get in touch with me once again via our contact form (the same way as recently) please?

    I've subscribe to this thread in order to not miss a thing.

    Regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.