Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloud Shell terminates before program finishes running

I have a python scraper that I use to collect product data from a ecommerce website. I am trying to run it in google cloud shell. The process itself usually takes 2-3hours to complete. However, given that the cloud shell disconnects after 1 hour of 'inactivity' (despite my scraper still running), my python scraper never completes the job. Is there a way to stop the cloud shell from automatically disconnecting? I have done this same thing in an AWS EC2 instance, and it works perfectly

And in a broader sense, is there a way I can spin up a google compute instance, start running a program on it, such that I can leave it running without having to constantly have a connection to it, and then come back to it after a few hours with the output of the program (csv file, in my case) waiting for me. It just seems like I am missing something, as terminating an instance and killing my webscraper just because I am not tapping away on the OS seems silly

Any help/advice much appreciated, thanks

like image 973
matthew matthee Avatar asked Jan 30 '26 16:01

matthew matthee


1 Answers

Based on this documentation page, I believe you cannot fix this: https://cloud.google.com/shell/docs/limitations

like image 164
Dmitry Avatar answered Feb 03 '26 11:02

Dmitry



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!