Coder Social home page Coder Social logo

Comments (9)

ergonlogic avatar ergonlogic commented on May 12, 2024

It looks like there is a mysqld process running, so perhaps a second one is started at some point...

from ansible-role-mysql.

ergonlogic avatar ergonlogic commented on May 12, 2024

Could it be that this isn't aggressive enough. Maybe a straight-up pkill mysqld?

from ansible-role-mysql.

geerlingguy avatar geerlingguy commented on May 12, 2024

Or a wait to make sure it's completely and totally shut down (it might take a while to shut down the first time, but report back that it's stopped before it's actually stopped). I am growing to dislike Debian/Ubuntu tremendously... between weird symlinked and changed-per-implementation paths and the terrible defaults and installation processes, it's an automation nightmare.

from ansible-role-mysql.

ergonlogic avatar ergonlogic commented on May 12, 2024

So I guess that'd be accomplished with a 'sleep' parameter in the restart mysql handler?

from ansible-role-mysql.

geerlingguy avatar geerlingguy commented on May 12, 2024

@ergonlogic - I'd still like to know what, in the environment, might be causing this issue. In my entire fleet of prod servers (mostly CentOS 6/7, but a good number (20+) Ubuntu 14.04 and 12.04), I've never had an issue where an instance of MySQL would get stuck :-/

I'm using the same role on Drupal VM, which uses the geerlingguy/ubuntu1404 box (which doesn't have MySQL pre-installed), and nobody else seems to have run into the error.

from ansible-role-mysql.

ergonlogic avatar ergonlogic commented on May 12, 2024

The intermittent nature of this behaviour makes it difficult to confirm. But, in the original bug report (GetValkyrie/valkyrie#54 (comment)) the issue arises when we call a Drush command on a site right after restarting the mysql service, as part of flushing handlers.

Note that the sleep parameter to the service module is described as:

If the service is being restarted then sleep this many seconds between the stop and start command. This helps to workaround badly behaving init scripts that exit immediately after signaling a process to stop.

I've added a 5-second sleep in my fork of this role (master...GetValkyrie:master) that I've since included in Valkyrie. It seems somewhat heavy-handed, but I'm not in a position to be able to test this myself. Hopefully, one of the users who is seeing this more consistently can provide feedback.

from ansible-role-mysql.

ergonlogic avatar ergonlogic commented on May 12, 2024

According to GetValkyrie/valkyrie#54 (comment), it looks like adding a 'sleep' to the service restart handler worked.

from ansible-role-mysql.

geerlingguy avatar geerlingguy commented on May 12, 2024

@ergonlogic - Ah, that makes sense then. I don't have anything run immediately after the restart, so the restart completes successfully by then.

I'll add a short sleep period to my role (5 seconds seems reasonable), since this could potentially affect others using the same init script, and it's not really a harmful change (just 5 more seconds every time the playbook is run... but an okay tradeoff).

from ansible-role-mysql.

Prospus-ShantiGola avatar Prospus-ShantiGola commented on May 12, 2024

Could it be that this isn't aggressive enough. Maybe a straight-up pkill mysqld?

Thanks, it works ....after using this comand just start my mysql service straight away " sudo service mysql start" service start working again.

from ansible-role-mysql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.