systemd service is stopped and never restarted when mysql is being upgraded
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.1k
- Forks
- 285
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 2
Description
What steps will reproduce the problem?
Twice now it has happened that my server, which automatically installs patches, has upgraded mysql, and before it stops the mysql service it shuts down my service. Mysql upgrades and all is good - but my service is never restarted. How can that be? First I tried setting Restart=always instead of Restart=on-failure but that didn't help. Now I'm trying setting PartOf=mysql.service to see if they will help...
Or can I just leave out the mysql dependency altogether? Shouldn't it then always restart? Or will mysql disappearing just make the script hang/freeze and systemd think the service is running fine?!
What's expected?
My service should always run - which kind of is the whole purpose with systemd! :)
What do you get instead?
It dies when mysql is upgraded. Status says: "inactive (dead) since..."
Additional info
| Q | A |
|---|---|
| Yii version | 2.0.42.1 |
| PHP version | 7.4 |
| Operating system | Debian 11 (Bullseye) |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the systemd unit and the MySQL upgrade lifecycle described in the report, including the mentioned Restart and PartOf settings. No repository file or test is named, so first establish whether the behavior belongs in yii2-queue or in service configuration; done means the service reliably restarts after a MySQL upgrade.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100