Does “docker stop name_of_container” corrupt databases?

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

I’m running a fairly simple python script with the official python docker container. The script has a loop that runs permanently and grabs some data from reddit API and writes it to the sqlite DB file in a folder that’s mounted with -v. I’m running it on a raid 1 without any known hardware issues. Haven’t had any crashes, the hardware is online 24/7. Somehow my database was corrupted and the only thing that makes sense to me is that I stopped the container while the script was mid write in the DB. Do I need some special code in my python script to properly shut down when I issue the docker stop command? Or should I manually do something to prevent this corruption before running the docker stop command? Or is it really unlikely that the docker stop command caused this? submitted by /u/ParkingPsychology [link] [comments]

X ITM Cloud News

Patricia

Leave a Reply

Next Post

Deploy Elasticsearch and appbase.io with Kubernetes in 10 steps

Fri Jul 31 , 2020
Spread the love           submitted by /u/sidi09 [link] [comments] X ITM Cloud News
X- ITM

Cloud Computing – Consultancy – Development – Hosting – APIs – Legacy Systems

X-ITM Technology helps our customers across the entire enterprise technology stack with differentiated industry solutions. We modernize IT, optimize data architectures, and make everything secure, scalable and orchestrated across public, private and hybrid clouds.

This image has an empty alt attribute; its file name is x-itmdc.jpg

The enterprise technology stack includes ITO; Cloud and Security Services; Applications and Industry IP; Data, Analytics and Engineering Services; and Advisory.

Watch an animation of  X-ITM‘s Enterprise Technology Stack

We combine years of experience running mission-critical systems with the latest digital innovations to deliver better business outcomes and new levels of performance, competitiveness and experiences for our customers and their stakeholders.

X-ITM invests in three key drivers of growth: People, Customers and Operational Execution.

The company’s global scale, talent and innovation platforms serve 6,000 private and public-sector clients in 70 countries.

X-ITM’s extensive partner network helps drive collaboration and leverage technology independence. The company has established more than 200 industry-leading global Partner Network relationships, including 15 strategic partners: Amazon Web Services, AT&T, Dell Technologies, Google Cloud, HCL, HP, HPE, IBM, Micro Focus, Microsoft, Oracle, PwC, SAP, ServiceNow and VMware

.

X ITM