Michael
El Presidente
Just Getting Started
Member Likes (0)
Hello there,
I have a problem again with the Snapshot plugin. I updated it and it seemed to work fine but.... it didn't. The problem consist in not finalizing the archive of a table.
The image with the problem is here : http://allmapamond.com/snapshot/Snapshot%20problem.png
Table rr_posts is one of the problem. I have another table which doesn't work as well and is rr_options. Can you get me some advice ?

Responses (36)
Support Kangaroo (joined March 2011) Likes (0)
Greetings Michael,
Lets start with the layout and go forward.
WordPress 3.3.1?
MultiSite or Solo?
Buddy Press?
Dedicated server or shared hosting?
Please advise.
Cheers, Joe
Member (joined July 2011) Likes (0)
Wordpress 3.3.1
Solo
No Buddy Press
Shared hosting
Support Kangaroo (joined March 2011) Likes (0)
Greetings Michael,
Does it seem to halt always around the same point?
It is my opinion from what information that I have to go on that it may be a php timeout issue.
If php does not have enough time to execute the script completely this could happen.
I have attached a file below that you would want to unzip and then upload to your host. Then to address the file in your browser i.e. http://yourdomain.com/phpinfo.php
From that screen check the line that says max_execution_time
Once you have that you want to compare if the script halts around that same time limit.
What is the time limit?
Please advise.
Cheers, Joe
Developer (joined January 2012) Likes (0)
Michael, from the image you provided the row count seems small. So the PHP timeout may not be your issue. Two possible ideas after following the suggestions from aecnu.
1. Under Snapshot > Settings you should see a panel for Segment Size. What is the value here? Try lowering this to something like 1000 or 2000.
What does this do? When you manually create a snapshot (like your screenshot) this uses AJAX/JS calls from your browser back to the server. If the table you are backing up is large then you run into timeouts like aecnu suggested. The Segment Size will break these requests into units of work. So instead of attempting to backup a large table or many thousand rows at once. It instead does this 1000 rows or data at a time. This was designed to help get around the PHP timeout issue.
2. If the above does not work I need to request you access your server and provide the logs file(s). By default snapshot archives are stored under /wp-content/uploads/snapshots/ Below this folder you should see another folder '_logs'. It should be the newest log file by date.
Member (joined July 2011) Likes (0)
So, max_execution_time is 300.
Member (joined July 2011) Likes (0)
I tried both 1000 and 2000 and nothing happen.
I attached all logs in the following link : http://www.allmapamond.com/snapshot/logs.php
Developer (joined January 2012) Likes (0)
Hmm. Appears there might be something in your rr_options and rr_posts Do you have access to a control panel via your hosting? Or some form of phpMyAdmin? Curious to know how many rows are in each of these tables. I can think the options table has more than a few thousand rows. Maybe something in the data is causing the logic to break.
Member (joined July 2011) Likes (0)
Table " rr_options " has :
and table " rr_posts " has :
Can I give you some details to take a look?
Support Kangaroo (joined March 2011) Likes (0)
Greetings Michael,
Execution time is great - 300 is more then sufficient.
I will let the lead developer of Snapshot work through this with you - it is Paul whom has been posting above even though his icon is mislabeled for some unknown reason.
I shall keep monitoring this ticket and your folks progress.
Cheers, Joe
Member (joined July 2011) Likes (0)
Thnaks Joe. Waiting for Paul then...:)
Developer (joined January 2012) Likes (0)
Michael, still this table rows are still relatively low. On the Segment Size try setting it to something low like 250 and try it again. Also curious if you have tried the scheduled backup for just one of these troubles tables. It still no luck We have three choices this point.
1. Dump the two table and provide a link so I can load them into my development system and try to debug. This may not work because this might be environmental. Do not post/upload the tables here.
2. You grant me access to your site so I can try and run the backup first hand. Do not post login information here.
3. Do you by chance have Firefox browser and Firebug installed? You may be able to run the backups and see the request/reply data between the browser and the server.
Member (joined July 2011) Likes (0)
I tried with 250 and the same error occur. I can grant you access, option 2 as you said. Wait for details.
Developer (joined January 2012) Likes (0)
Michael, Please send a message to our contact form here: http://premium.wpmudev.org/contact/
Put my name (Paul) in the subject and provide a link to this thread along with your login credentials.
Thanks,
Paul
Member (joined July 2011) Likes (0)
I sent all the information you asked. Wait for a reply from you.
Developer (joined January 2012) Likes (0)
Michael, ok received the login information over the weekend. Thank You for that. Logged into your site this morning and tried to run a new snapshot on just the rr_posts table. From the debug info I see the following error memory limit error
<b>Fatal error</b>: Allowed memory size of 33554432 bytes exhausted (tried to allocate 46 bytes) in <b>/hermes/bosweb26d/b844/sl.darkmen2011/public_html/wp-includes/wp-db.php</b> on line <b>1402</b>
From the small number of posts I can't see why this is causing issues. Still digging.
Developer (joined January 2012) Likes (0)
Another update on this.
According to the Snapshot > Settings > Server Info the memory_limit value is 256M. This should be sufficient for the snapshot needs.
So made some edits to your local copy of snapshot. Added a line to output the current memory_limit value as part of the debug output. Seems the memory limit value is set at 32M. This is very low. Looking into why the memory limit is different from the Settings value. Must be something with the AJAX calls. These are all properly setup.
Member (joined July 2011) Likes (0)
Thanks for updates. What should i do then to work?
Developer (joined January 2012) Likes (0)
I've made an edit to the snapshot plugin code on your site. Setting the memory_limit manually to 256M for the AJAX call. This allowed me to create a snapshot for the rr_posts table.
Then I thought I would try a full snapshot of all tables. Now getting the following error:
ERROR: Snapshot backup aborted.Error getting table details: rr_delete-duplicate-posts_log
Not sure this is something I can control via the Snapshot plugin. But want to try and get this to be more graceful. When this error is hit the backup processing just aborts.
Member (joined July 2011) Likes (0)
I see. I don't bother do it manually, even table by table, but I want to work. Maybe it's something wrong with the tables, I thought. I don't really know what to say. I'm not a programmer either to help you. So, keep me posted please. Thanks a lot for your help.
Developer (joined January 2012) Likes (0)
I'm still trying things. I'll let you know what I find. At least we are past the one issues of not being able to backup the rr_posts table.
Developer (joined January 2012) Likes (0)
Yeah, there is something strange on that table. Where this is failing is where Snapshot tries to determine the structure of the table. To do this a MySQL command 'DESCRIBE rr_delete-duplicate-posts_log' is executed. This should return information about the columns. This is needed in order to properly export the fields. If I execute this command on my own database for the wp_posts table for example it returns the structure information like:
[0] => stdClass Object
(
[Field] => ID
[Type] => bigint(20) unsigned
[Null] => NO
[Key] => PRI
[Default] =>
[Extra] => auto_increment
)
[1] => stdClass Object
(
[Field] => post_author
[Type] => bigint(20) unsigned
[Null] => NO
[Key] => MUL
[Default] => 0
[Extra] =>
)
[2] => stdClass Object
(
[Field] => post_date
[Type] => datetime
[Null] => NO
[Key] =>
[Default] => 0000-00-00 00:00:00
[Extra] =>
)
So I'm adding code to your version of Snapshot to skip tables like this where the column information cannot be obtained. Still does not help you. Do you have access to your hosting control panel? It might help you to get into your hosting phpMyAdmin which is a web interface where you can via the table information
Developer (joined January 2012) Likes (0)
Ok. More progress. After excluding the one bad table I'm now able to generate a snapshot backup for all WordPress and non-WordPress tables successfully.
Member (joined July 2011) Likes (0)
I can give you a single table ( whatever you want ), or the whole database if you need it to test some functions. Just let me know, ok?
Concerning this, what should I do now?
Developer (joined January 2012) Likes (0)
the whole database would be great. I suspect the table exists but may be corrupt or for some reason does not have columns. If you can somehow export this via your control panel then I will be able to possibly figure out some way around it. DO NOT post a link to the export here. Use the same method where you passed me the admin access. If you can upload the export to some dropbox or some place and just provide a link.
As for what to do next I think your issues are solved. As I wrote I was able to create a complete snapshot of all your tables except for the one bad table.
Developer (joined January 2012) Likes (0)
Actually, hold on exporting the database. I just found the issue. Fixed more code and now able to create a snapshot for ALL tables. No errors. Please give this a try on your end.
Member (joined July 2011) Likes (0)
Hello and thanks again. I gave the details to the admins of the website. You should receive it very quickly. Thanks again for helping me.
Member (joined July 2011) Likes (0)
I already sent you the database but don't worry. I am happy to see you solved the problem. Was it form the database ?
I want to ask you one more thing : if you do another update of Snapshot plugin, should I update it concerning the modification you made to it for my website or how do I have to proceed?
Member (joined July 2011) Likes (0)
I did a full back-up of all core and non-core tables and worked like a charm. Very easy and quick. I don't know what you did but I thank you.
Developer (joined January 2012) Likes (0)
Michael, again the thanks goes to you for letting me in your system and allowing me to make changes and test things. With your help I just released version 1.0.4 of Snapshot. This fixed some errors I found while running on your site. I also added a new Settings panel for Memory Limit which should help folks get around issues similar to what you were seeing. I've also figured out a way to trap the PHP errors like the memory limit which will now be included in the backup logs so the user can see these and report back to the forums here on runtime issues.
So thanks again for your help and thanks for trusting us. And thanks for being a subscriber. Much appreciated.
Also, if you upgrade please set your Memory Limit to '256M'. This is what I had hard-coded in your custom version on Monday.
Member (joined July 2011) Likes (0)
How can I do that? Where from?
Developer (joined January 2012) Likes (0)
After you upgrade to version 1.0.4 go to Snapshot > Settings. you should see listed a panel called 'Memory Limit'. Here is an image
Member (joined July 2011) Likes (0)
I see. Ok. Thanks a lot.
Member (joined July 2011) Likes (0)
Hello again. Today I upgraded the Snapshot plugin to the latest version which is 1.0.5. I tried then to make a backup of rr_posts table and here what I got in the log file :
The error I received was :
I should say that memory Limit is to 256MB as you suggested. You have the same login credentials as the last time, in case you want to look up for something.
Developer (joined January 2012) Likes (0)
Michael, ok. I'm logging into your site and will check things.
Developer (joined January 2012) Likes (0)
Michael, I was able to create a new snapshot after setting your Memory Limit to 512M. Your site is something unique and I'm not sure why. The issue is this. On your Settings panel under the Server Info section you see the Memory Limit reads 256M. But for some reason via the AJAX calls the default memory limit is only set to 32M.
I also tried setting the Snapshot Memory Limit to 256M but was still receiving memory issues. Setting it to 512M seems to have solved the issue.
Member (joined July 2011) Likes (0)
I tried it one more time and it worked like a charn, Thanks again.
Become a member