Have you every encountered this issue when an App Engine process keeps failing with No Success message over and again. Lets discuss what might cause this and how we can resolve.
The Application Engine program which is restart-able always commits the DB transactions if it fails. We can make an app engine re-startable by clearing the checkbox "Disable Restart" in the properties dialog box as shown below:
The Application Engine program which is restart-able always commits the DB transactions if it fails. We can make an app engine re-startable by clearing the checkbox "Disable Restart" in the properties dialog box as shown below:
The next course of action is to re-start the process again hoping that it would resume the processing from where it got failed. If the program have been setup that way then it would work as expected but if not then it will fail again.
Even if you delete the failed process instance and kick of the process again, it would still fail because during the first run the program would have inserted processing data into temp tables and when you run the program again, it tries to insert the same set of processing data into the same temp tables causing the process to fail.
Now the question is, how to resolve this ?
The simple answer is - first clear all the temporary processing data from the tables and then run the process again. But this is easier said than done. So lets break it down into the steps needed to resolve this issue.
Gather all the temporary table instances and standard SQL tables
In this step we need to collect the names of all the tables into which the program tries to insert the data. The easiest way to do this is by first enabling the Application Engine trace and then checking the SQL trace file. Just search all the INSERT INTO text in the SQL trace file which will give you all the tables where the temporary or the transnational data is inserted.
Deleting the data from tables
In this step we will delete the data form all the tables gathered in previous step but perform this task very carefully so that we don't end up deleting any data which which isn't supposed to. First of all, all the data from temp tables can be deleted without any worry. However, before deleting the data from standard SQL tables, we first need to analyse and determine what exactly need to be deleted or updated and only after that data should be deleted.
Run the process again
After all the temporary or transnational data is deleted, we are ready to run the process again. So once the process is run again it should go to success.