Capistrano looses progress

46 views
Skip to first unread message

Arne De Herdt

unread,
Oct 20, 2016, 8:25:04 AM10/20/16
to Capistrano
Versions:
  • Ruby 2.3
  • Capistrano 3.6.1
  • Rake / Rails / etc 11.3.0 / 4.2.7.1
Platform:
  • Working on OSX
  • Deploying to Ubuntu/CentOS


Hello,


We are currently running into a weird behaviour with Capistrano that started appearing when our database backup exceeded the 4GB in size.

I've attached the rake task for generating a backup to show you how it works, it's basically creating a pg_dump.


The problem we encounter, is that before doing the deploy, we ask whether a database backup is needed.

If the answer is yes, then we invoke the task that is in the backup.rake.

Now when the backup is larger then 4GB, Capistrano seems to lose the connection with the server.

We do not get any feedback from Capistrano whether the task succeeded, failed or is still running.

So after roughly one hour, we kill the task locally by pressing ctrl +C, and run the deploy again without backup.


The result is that we then succeed at deploying, and the backup is actually being made.

So we know that the backup task itself actually works, it's just that Capistrano doesn't send us feedback.


Is there some settings we could look into?

Like a TTL, Timeout or have the task report back the progress/output from the pg_dump or something?


Kind regards,

Arne De Herdt

backup.rake

Lee Hambley

unread,
Oct 20, 2016, 12:40:10 PM10/20/16
to Capistrano
I suspect you're right that the task is hanging because of a lack of output, it's a common issue.

Is there some settings we could look into?
Like a TTL, Timeout or have the task report back the progress/output from the pg_dump or something?

first thing that comes to mind is to run the output of `pg_dump` through `pv` [1] and set it to print some periodic status update, pv is a pretty worthwhile little tool anyway, and it might solve this problem really neatly.

--
You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/5bc45616-432f-4ab1-9907-39a076d95f46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Arne De Herdt

unread,
Oct 24, 2016, 4:18:20 AM10/24/16
to Capistrano
Hey Lee,

I figured out the problem.....
It was actually the VPN that terminates the connection after one hour.
The entire backup simply took too long, so the connection was considered idle.
We've switched to parallel dumps now and Capistrano no longer looses the progress and everything works as expected.

Kind regards,
Arne

Op donderdag 20 oktober 2016 18:40:10 UTC+2 schreef Lee Hambley:
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+...@googlegroups.com.

Lee Hambley

unread,
Oct 24, 2016, 4:48:53 AM10/24/16
to Capistrano
Great, glad to hear it :)
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/0cf320e3-3d7c-4d42-862f-6887bb01e078%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages