Go1.8: RunInBackground not returning an error, but not starting a new request

53 views
Skip to first unread message

Evan Jones

unread,
Oct 3, 2017, 3:22:36 PM10/3/17
to google-appengine-go
We have a process that we run in a manual_scaling App Engine service, using Go 1.8. We have a process that does some work, then calls runtime.RunInBackground to restart itself. This way, the logs look more sensible, since this seems to start a "new" request. Twice now, after running for a while (in the case, about a week or so), it calls RunInBackground, which does not return an error, but the new background thread never starts.

Is there any problem with using RunInBackground in this way, with a manual scaling instance that will remain running for a long time? Are there any reasons that RunInBackground can fail that I should be aware of?

I guess I probably should be using a cron that runs once a minute instead of something that sleeps and calls RunInBackground over and over again...

Thanks for any suggestions!

Evan

Evan Jones

unread,
Oct 25, 2017, 4:05:32 PM10/25/17
to google-appengine-go
To follow up just in case someone runs into this thread by searching the Internet: Over the past month we've had this happen a couple more times. I can confirm that RunInBackground does not return an error, the code the completes, and the subsequent call never happens. I'm going to switch this to a per-minute cron to attempt to avoid this issue.
Reply all
Reply to author
Forward
0 new messages