<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux &#8211; Marc-Olivier Meunier</title>
	<atom:link href="https://momeunier.fr/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://momeunier.fr</link>
	<description>Customer Engagement Leader // Ultra-distance cyclist</description>
	<lastBuildDate>Mon, 06 Mar 2023 19:12:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.5</generator>

<image>
	<url>https://momeunier.fr/wp-content/uploads/2022/09/cropped-cropped-ma-pomme-32x32.jpeg</url>
	<title>Linux &#8211; Marc-Olivier Meunier</title>
	<link>https://momeunier.fr</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Restart a failed service</title>
		<link>https://momeunier.fr/restart-a-failed-service/</link>
					<comments>https://momeunier.fr/restart-a-failed-service/#respond</comments>
		
		<dc:creator><![CDATA[Marc Olivier Meunier]]></dc:creator>
		<pubDate>Tue, 24 Jan 2023 21:09:43 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://momeunier.fr/?p=12356</guid>

					<description><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> &#60; 1</span> <span class="rt-label rt-postfix">minute</span></span>Sometimes my MariaDB database fails and crash. I am not sure why and I am not sure I want to find out why as I am guessing it would require some investigation and it may be above my pay grade. It happens quiet rarely but every now and then it happens and when it does, [&#8230;]]]></description>
										<content:encoded><![CDATA[<div id="bsf_rt_marker"></div><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> &lt; 1</span> <span class="rt-label rt-postfix">minute</span></span>
<p>Sometimes my MariaDB database fails and crash. I am not sure why and I am not sure I want to find out why as I am guessing it would require some investigation and it may be above my pay grade. </p>



<p>It happens quiet rarely but every now and then it happens and when it does, my supervision is pinging on Slack and sending emails until it&#8217;s fixed.</p>



<p>One really bad option to hide this problem would be to automatically restart the database when it fails. I could run a cron every minute to check that the database is up.</p>



<p>It&#8217;s a very bad option. If we push this solution to its extreme, I could find myself in a position where the database is crashing every few minutes, and I restart it right away, before the supervision would detect the problem, and I would not be aware of the problem. No need to say that having a database crashing every few minutes is suboptimal&#8230;</p>



<p>But we could still do it for now as it seems it is crashing really rarely.</p>



<p>The easiest option I&#8217;ve found is to use systemctl.</p>



<p>Running this in a cron will do the job:</p>



<pre class="wp-block-code"><code>* * * * * systemctl is-failed --quiet mariadb.service &amp;&amp; systemctl start mariadb.service</code></pre>



<p>And maybe I could get a notification that this happened by sending myself an email&#8230; except emailing from a server is hard these days&#8230; If you know, you know.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://momeunier.fr/restart-a-failed-service/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
