Reputation: 653
I have a production issue with a GAE application. The problem seems to be related only to some users.
Is there a possibility to connect the local debugger to the prod version ? I'd like to avoid to have to copy the prod data to the dev server.
Thanks !
Upvotes: 0
Views: 226
Reputation: 4634
This situation has improved as of a few days ago with the intoduction of Google Cloud Debugger
Earlier this week at Google Cloud Platform Live, we launched the beta release of Cloud Debugger which makes it easier to troubleshoot applications in production. Now you can simply pick a line of code, set a watchpoint and the debugger will return local variables and a full stack trace from the next request that executes that line on any replica of your service. There is zero setup time, no complex configurations and no performance impact noticeable to your users.
Upvotes: 2
Reputation: 653
I managed to solve the issue. The problem was that one program was throwing an exception and I did not catch it properly. The code was
catch (Exception e) {
e.printStackTrace();
}
On the development platform the exception was thrown at the console. The problem in production is that it does not appear in the GAE console. This has two very bad outcomes :
--> 1) The end user does not know that the transaction did not end successfully
--> 2) The administrator has no clue that a problem has occurred and no way to debug
==>
I have therefore replaced the code by
catch (Exception e) {
final Logger log = Logger.getLogger(InternalServiceImpl.class.getName());
log.severe("Problem while updating XXX record : " + e.getLocalizedMessage());
updatedRecord.setRPCResult(DB_PROBLEM); // This is specific to my application to notify the end user
}
I did modify the code relaunched the application and found out that the problem was a resource contention in a transaction.
Was really a stupid beginner mistake.
Upvotes: 0