home.social

#systemd — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #systemd, aggregated by home.social.

fetched live
  1. Installing #FreeBSD on my new laptop to escape the massive #AI and bloat madness of #Linux. Opened the terminal and it is a real Unix, all my favorite tools and utilities are there from decades ago. Nothing has been "depreciated" or "Unix is dead" that #Redhat and their #systemD were constantly gaslighting about.

    It's all there, even CDE/Motif, xv, oclock, xeyes, finger, ...

    Since this is a new laptop with new GPU and all that, I am having to do some scraping from a Linux distribution to get Xorg working. Even GhostBSD didn't have all the new drivers yet. But this is Unix and the included documentation and build tools are amazing. Shame that the Linux Foundation is heavily invested by the AI goons. But this is a win for me😸

  2. Installing #FreeBSD on my new laptop to escape the massive #AI and bloat madness of #Linux. Opened the terminal and it is a real Unix, all my favorite tools and utilities are there from decades ago. Nothing has been "depreciated" or "Unix is dead" that #Redhat and their #systemD were constantly gaslighting about.

    It's all there, even CDE/Motif, xv, oclock, xeyes, finger, ...

    Since this is a new laptop with new GPU and all that, I am having to do some scraping from a Linux distribution to get Xorg working. Even GhostBSD didn't have all the new drivers yet. But this is Unix and the included documentation and build tools are amazing. Shame that the Linux Foundation is heavily invested by the AI goons. But this is a win for me😸

  3. Installing #FreeBSD on my new laptop to escape the massive #AI and bloat madness of #Linux. Opened the terminal and it is a real Unix, all my favorite tools and utilities are there from decades ago. Nothing has been "depreciated" or "Unix is dead" that #Redhat and their #systemD were constantly gaslighting about.

    It's all there, even CDE/Motif, xv, oclock, xeyes, finger, ...

    Since this is a new laptop with new GPU and all that, I am having to do some scraping from a Linux distribution to get Xorg working. Even GhostBSD didn't have all the new drivers yet. But this is Unix and the included documentation and build tools are amazing. Shame that the Linux Foundation is heavily invested by the AI goons. But this is a win for me😸

  4. Installing #FreeBSD on my new laptop to escape the massive #AI and bloat madness of #Linux. Opened the terminal and it is a real Unix, all my favorite tools and utilities are there from decades ago. Nothing has been "depreciated" or "Unix is dead" that #Redhat and their #systemD were constantly gaslighting about.

    It's all there, even CDE/Motif, xv, oclock, xeyes, finger, ...

    Since this is a new laptop with new GPU and all that, I am having to do some scraping from a Linux distribution to get Xorg working. Even GhostBSD didn't have all the new drivers yet. But this is Unix and the included documentation and build tools are amazing. Shame that the Linux Foundation is heavily invested by the AI goons. But this is a win for me😸

  5. Installing #FreeBSD on my new laptop to escape the massive #AI and bloat madness of #Linux. Opened the terminal and it is a real Unix, all my favorite tools and utilities are there from decades ago. Nothing has been "depreciated" or "Unix is dead" that #Redhat and their #systemD were constantly gaslighting about.

    It's all there, even CDE/Motif, xv, oclock, xeyes, finger, ...

    Since this is a new laptop with new GPU and all that, I am having to do some scraping from a Linux distribution to get Xorg working. Even GhostBSD didn't have all the new drivers yet. But this is Unix and the included documentation and build tools are amazing. Shame that the Linux Foundation is heavily invested by the AI goons. But this is a win for me😸

  6. Linux security tip:

    systemd-analyze security <service-name>

    A built-in tool for checking how well a systemd service is sandboxed and spotting unnecessary permissions.

    Great for enforcing least privilege, especially on network-facing services.

    Don’t chase a perfect score. Some services like sshd need elevated access. Test changes before production.

    #Linux #systemd #Cybersecurity #SysAdmin #Technology #CyberSec #Security #Tech #InfoSec #DevSecOps #Secure

  7. Linux security tip:

    systemd-analyze security <service-name>

    A built-in tool for checking how well a systemd service is sandboxed and spotting unnecessary permissions.

    Great for enforcing least privilege, especially on network-facing services.

    Don’t chase a perfect score. Some services like sshd need elevated access. Test changes before production.

    #Linux #systemd #Cybersecurity #SysAdmin #Technology #CyberSec #Security #Tech #InfoSec #DevSecOps #Secure

  8. Linux security tip:

    systemd-analyze security <service-name>

    A built-in tool for checking how well a systemd service is sandboxed and spotting unnecessary permissions.

    Great for enforcing least privilege, especially on network-facing services.

    Don’t chase a perfect score. Some services like sshd need elevated access. Test changes before production.

    #Linux #systemd #Cybersecurity #SysAdmin #Technology #CyberSec #Security #Tech #InfoSec #DevSecOps #Secure

  9. Linux security tip:

    systemd-analyze security <service-name>

    A built-in tool for checking how well a systemd service is sandboxed and spotting unnecessary permissions.

    Great for enforcing least privilege, especially on network-facing services.

    Don’t chase a perfect score. Some services like sshd need elevated access. Test changes before production.

    #Linux #systemd #Cybersecurity #SysAdmin #Technology #CyberSec #Security #Tech #InfoSec #DevSecOps #Secure

  10. Linux security tip:

    systemd-analyze security <service-name>

    A built-in tool for checking how well a systemd service is sandboxed and spotting unnecessary permissions.

    Great for enforcing least privilege, especially on network-facing services.

    Don’t chase a perfect score. Some services like sshd need elevated access. Test changes before production.

    #Linux #systemd #Cybersecurity #SysAdmin #Technology #CyberSec #Security #Tech #InfoSec #DevSecOps #Secure

  11. #TIL (Today I Learned) that (regarding Arch Linux) the tool mkinitcpio apparently changed its default approach from the busybox approach to the systemd approach sometime in 2025.

    So if you installed Arch in 2026 and follow some older guides/videos, you could maybe mess up your mkinitcpio configuration and thus initramfs image, maybe rendering your computer unbootable.

    #Linux #Arch #ArchLinux #systemd

  12. #TIL (Today I Learned) that (regarding Arch Linux) the tool mkinitcpio apparently changed its default approach from the busybox approach to the systemd approach sometime in 2025.

    So if you installed Arch in 2026 and follow some older guides/videos, you could maybe mess up your mkinitcpio configuration and thus initramfs image, maybe rendering your computer unbootable.

    #Linux #Arch #ArchLinux #systemd

  13. (Today I Learned) that (regarding Arch Linux) the tool mkinitcpio apparently changed its default approach from the busybox approach to the systemd approach sometime in 2025.

    So if you installed Arch in 2026 and follow some older guides/videos, you could maybe mess up your mkinitcpio configuration and thus initramfs image, maybe rendering your computer unbootable.

  14. #TIL (Today I Learned) that (regarding Arch Linux) the tool mkinitcpio apparently changed its default approach from the busybox approach to the systemd approach sometime in 2025.

    So if you installed Arch in 2026 and follow some older guides/videos, you could maybe mess up your mkinitcpio configuration and thus initramfs image, maybe rendering your computer unbootable.

    #Linux #Arch #ArchLinux #systemd

  15. #TIL (Today I Learned) that (regarding Arch Linux) the tool mkinitcpio apparently changed its default approach from the busybox approach to the systemd approach sometime in 2025.

    So if you installed Arch in 2026 and follow some older guides/videos, you could maybe mess up your mkinitcpio configuration and thus initramfs image, maybe rendering your computer unbootable.

    #Linux #Arch #ArchLinux #systemd

  16. I've released version 0.9.0 of AI Playground - A command-line tool to run AI coding agents like OpenCode or Claude Code in a secure systemd-nspawn container.

    Learn more at gitlab.com/cryptomilk/ai-playg

    #opencode #claudecode #sandbox #systemd #container

  17. I've released version 0.9.0 of AI Playground - A command-line tool to run AI coding agents like OpenCode or Claude Code in a secure systemd-nspawn container.

    Learn more at gitlab.com/cryptomilk/ai-playg

    #opencode #claudecode #sandbox #systemd #container

  18. I've released version 0.9.0 of AI Playground - A command-line tool to run AI coding agents like OpenCode or Claude Code in a secure systemd-nspawn container.

    Learn more at gitlab.com/cryptomilk/ai-playg

    #opencode #claudecode #sandbox #systemd #container

  19. I've released version 0.9.0 of AI Playground - A command-line tool to run AI coding agents like OpenCode or Claude Code in a secure systemd-nspawn container.

    Learn more at gitlab.com/cryptomilk/ai-playg

    #opencode #claudecode #sandbox #systemd #container

  20. I've released version 0.9.0 of AI Playground - A command-line tool to run AI coding agents like OpenCode or Claude Code in a secure systemd-nspawn container.

    Learn more at gitlab.com/cryptomilk/ai-playg

    #opencode #claudecode #sandbox #systemd #container

  21. Приложение течёт, а утечки нет: как оптимизатор картинок Next.js съел 4-гигабайтный VPS

    История про то, как я три дня искал утечку памяти в Node-приложении, не нашёл — и был прав, что не нашёл. А ещё про то, что у каждого починенного пункта тут оказывался свой счёт: фикс памяти через месяц вернулся жалобой на скорость, а разбор скорости вскрыл третью проблему, о которой я не думал вовсе.

    habr.com/ru/articles/1070312/

    #nextjs #nodejs #sharp #libvips #утечка_памяти #malloc_arena_max #systemd #nginx #оптимизация_изображений #avif

  22. Приложение течёт, а утечки нет: как оптимизатор картинок Next.js съел 4-гигабайтный VPS

    История про то, как я три дня искал утечку памяти в Node-приложении, не нашёл — и был прав, что не нашёл. А ещё про то, что у каждого починенного пункта тут оказывался свой счёт: фикс памяти через месяц вернулся жалобой на скорость, а разбор скорости вскрыл третью проблему, о которой я не думал вовсе.

    habr.com/ru/articles/1070312/

    #nextjs #nodejs #sharp #libvips #утечка_памяти #malloc_arena_max #systemd #nginx #оптимизация_изображений #avif

  23. Приложение течёт, а утечки нет: как оптимизатор картинок Next.js съел 4-гигабайтный VPS

    История про то, как я три дня искал утечку памяти в Node-приложении, не нашёл — и был прав, что не нашёл. А ещё про то, что у каждого починенного пункта тут оказывался свой счёт: фикс памяти через месяц вернулся жалобой на скорость, а разбор скорости вскрыл третью проблему, о которой я не думал вовсе.

    habr.com/ru/articles/1070312/

    #nextjs #nodejs #sharp #libvips #утечка_памяти #malloc_arena_max #systemd #nginx #оптимизация_изображений #avif

  24. Shorter: Milo Minderbinder was here and has swapped what we wanted for a chit and an empty promise.

    Infantile aimless ambition.

    #systemd

  25. Shorter: Milo Minderbinder was here and has swapped what we wanted for a chit and an empty promise.

    Infantile aimless ambition.

    #systemd

  26. Shorter: Milo Minderbinder was here and has swapped what we wanted for a chit and an empty promise.

    Infantile aimless ambition.

    #systemd

  27. Shorter: Milo Minderbinder was here and has swapped what we wanted for a chit and an empty promise.

    Infantile aimless ambition.

    #systemd

  28. Shorter: Milo Minderbinder was here and has swapped what we wanted for a chit and an empty promise.

    Infantile aimless ambition.

    #systemd

  29. Как ядро Linux решает, какой процесс «убить» при нехватке памяти

    В сентябре 2004 года разработчик Томас Хабетс вернулся к рабочей станции и обнаружил, что его экран разблокирован. Память закончилась, OOM Killer выбрал жертву и завершил xlock... Для того, чтобы больше такого не произошло Хабетс предложил список процессов, которые Linux запрещено убивать даже в такой ситуации. Его патч в ядро не вошёл, но позже разработчики добавили настройку приоритетов, поддержку cgroups и отдельный поток для быстрого освобождения памяти. Несмотря на это, OOM Killer всё равно может снести важный процесс, ведь ядро видит только объём памяти и заданные администратором правила. Если правил нет, то Linux сам решает, кого «убить». Почему и что делать, чтобы этого не произошло — в статье. Читать

    habr.com/ru/companies/ruvds/ar

    #Linux #OOM_Killer #память #ядро_Linux #системное_администрирование #systemd #systemdoomd #cgroups_v2 #PSI #ruvds_статьи

  30. Как ядро Linux решает, какой процесс «убить» при нехватке памяти

    В сентябре 2004 года разработчик Томас Хабетс вернулся к рабочей станции и обнаружил, что его экран разблокирован. Память закончилась, OOM Killer выбрал жертву и завершил xlock... Для того, чтобы больше такого не произошло Хабетс предложил список процессов, которые Linux запрещено убивать даже в такой ситуации. Его патч в ядро не вошёл, но позже разработчики добавили настройку приоритетов, поддержку cgroups и отдельный поток для быстрого освобождения памяти. Несмотря на это, OOM Killer всё равно может снести важный процесс, ведь ядро видит только объём памяти и заданные администратором правила. Если правил нет, то Linux сам решает, кого «убить». Почему и что делать, чтобы этого не произошло — в статье. Читать

    habr.com/ru/companies/ruvds/ar

    #Linux #OOM_Killer #память #ядро_Linux #системное_администрирование #systemd #systemdoomd #cgroups_v2 #PSI #ruvds_статьи

  31. Как ядро Linux решает, какой процесс «убить» при нехватке памяти

    В сентябре 2004 года разработчик Томас Хабетс вернулся к рабочей станции и обнаружил, что его экран разблокирован. Память закончилась, OOM Killer выбрал жертву и завершил xlock... Для того, чтобы больше такого не произошло Хабетс предложил список процессов, которые Linux запрещено убивать даже в такой ситуации. Его патч в ядро не вошёл, но позже разработчики добавили настройку приоритетов, поддержку cgroups и отдельный поток для быстрого освобождения памяти. Несмотря на это, OOM Killer всё равно может снести важный процесс, ведь ядро видит только объём памяти и заданные администратором правила. Если правил нет, то Linux сам решает, кого «убить». Почему и что делать, чтобы этого не произошло — в статье. Читать

    habr.com/ru/companies/ruvds/ar

    #Linux #OOM_Killer #память #ядро_Linux #системное_администрирование #systemd #systemdoomd #cgroups_v2 #PSI #ruvds_статьи

  32. Desde hace algunos días mi PC se apagaba sola de vez en cuando de manera aleatoria 😓

    1️⃣ En primer momento pensé que era la fuente (es un poco chica para lo que consume), pero de ser así fallaría siempre igual.

    2️⃣ Otra opción: que esté fallando el botón de encendido y envíe la señal de apagado sin que lo haya presionado.

    👉️ Cargué esta opción en el /etc/systemd/logind.conf:

    HandlePowerKey=ignore

    Y hasta ahora parece funcionar 🤞

    Digo, por si le sirve a alguien!

    #archlinux #systemd #logind

  33. Desde hace algunos días mi PC se apagaba sola de vez en cuando de manera aleatoria 😓

    1️⃣ En primer momento pensé que era la fuente (es un poco chica para lo que consume), pero de ser así fallaría siempre igual.

    2️⃣ Otra opción: que esté fallando el botón de encendido y envíe la señal de apagado sin que lo haya presionado.

    👉️ Cargué esta opción en el /etc/systemd/logind.conf:

    HandlePowerKey=ignore

    Y hasta ahora parece funcionar 🤞

    Digo, por si le sirve a alguien!

    #archlinux #systemd #logind

  34. Desde hace algunos días mi PC se apagaba sola de vez en cuando de manera aleatoria 😓

    1️⃣ En primer momento pensé que era la fuente (es un poco chica para lo que consume), pero de ser así fallaría siempre igual.

    2️⃣ Otra opción: que esté fallando el botón de encendido y envíe la señal de apagado sin que lo haya presionado.

    👉️ Cargué esta opción en el /etc/systemd/logind.conf:

    HandlePowerKey=ignore

    Y hasta ahora parece funcionar 🤞

    Digo, por si le sirve a alguien!

    #archlinux #systemd #logind

  35. Desde hace algunos días mi PC se apagaba sola de vez en cuando de manera aleatoria 😓

    1️⃣ En primer momento pensé que era la fuente (es un poco chica para lo que consume), pero de ser así fallaría siempre igual.

    2️⃣ Otra opción: que esté fallando el botón de encendido y envíe la señal de apagado sin que lo haya presionado.

    👉️ Cargué esta opción en el /etc/systemd/logind.conf:

    HandlePowerKey=ignore

    Y hasta ahora parece funcionar 🤞

    Digo, por si le sirve a alguien!

    #archlinux #systemd #logind

  36. #systemd SAYNUL, mais systemd-resolved, c'est quand même la manière la plus simple de mettre en place un dns-cache local.
    Selon la workload ça change tout, rien qu'en activant systemd-resolved, j'ai une machine qui est passée de 3000 requêtes DNS/minute à une trentaine. Divisé par 100 !

  37. #systemd SAYNUL, mais systemd-resolved, c'est quand même la manière la plus simple de mettre en place un dns-cache local.
    Selon la workload ça change tout, rien qu'en activant systemd-resolved, j'ai une machine qui est passée de 3000 requêtes DNS/minute à une trentaine. Divisé par 100 !

  38. #systemd SAYNUL, mais systemd-resolved, c'est quand même la manière la plus simple de mettre en place un dns-cache local.
    Selon la workload ça change tout, rien qu'en activant systemd-resolved, j'ai une machine qui est passée de 3000 requêtes DNS/minute à une trentaine. Divisé par 100 !

  39. Пишем логи в journald с помощью Logback и FFM API

    Разворачивать бэкенды для личного использования с помощью systemd удобно, но stdout плохо интегрируется с journald, а устанавливать софт только для просмотра логов не хочется. В статье - простой пример, как можно писать логи из Java-приложения в journald так, чтобы их потом удобно просматривать

    habr.com/ru/articles/1068800/

    #journald #Logback #systemd #Foreign_Functions_and_Memory_API

  40. Пишем логи в journald с помощью Logback и FFM API

    Разворачивать бэкенды для личного использования с помощью systemd удобно, но stdout плохо интегрируется с journald, а устанавливать софт только для просмотра логов не хочется. В статье - простой пример, как можно писать логи из Java-приложения в journald так, чтобы их потом удобно просматривать

    habr.com/ru/articles/1068800/

    #journald #Logback #systemd #Foreign_Functions_and_Memory_API

  41. Пишем логи в journald с помощью Logback и FFM API

    Разворачивать бэкенды для личного использования с помощью systemd удобно, но stdout плохо интегрируется с journald, а устанавливать софт только для просмотра логов не хочется. В статье - простой пример, как можно писать логи из Java-приложения в journald так, чтобы их потом удобно просматривать

    habr.com/ru/articles/1068800/

    #journald #Logback #systemd #Foreign_Functions_and_Memory_API

  42. systemd is now 16 years old - and still I dislike it and everything around it. Heavily.

    Recent events forced me to dig waaay deeper into it than I wanted to.

    To make this story short:

    `systemd-analyze security [name].service` is a neat tool which has shown me quite a bit of effort there is in systemd (and yes, I still dislike all of it!)

    And one shouldn't set `ProtectHome=true` and try to start a service in ~/[service].

    Of course, if the error had been something different than `203/EXEC` I probably wouldn't have had this "wonderful" journey...

    (perhaps this helps somebody someone. Most presumably via some AI.....)

    #linux #systemd #hardening

  43. systemd is now 16 years old - and still I dislike it and everything around it. Heavily.

    Recent events forced me to dig waaay deeper into it than I wanted to.

    To make this story short:

    `systemd-analyze security [name].service` is a neat tool which has shown me quite a bit of effort there is in systemd (and yes, I still dislike all of it!)

    And one shouldn't set `ProtectHome=true` and try to start a service in ~/[service].

    Of course, if the error had been something different than `203/EXEC` I probably wouldn't have had this "wonderful" journey...

    (perhaps this helps somebody someone. Most presumably via some AI.....)

    #linux #systemd #hardening

  44. systemd is now 16 years old - and still I dislike it and everything around it. Heavily.

    Recent events forced me to dig waaay deeper into it than I wanted to.

    To make this story short:

    `systemd-analyze security [name].service` is a neat tool which has shown me quite a bit of effort there is in systemd (and yes, I still dislike all of it!)

    And one shouldn't set `ProtectHome=true` and try to start a service in ~/[service].

    Of course, if the error had been something different than `203/EXEC` I probably wouldn't have had this "wonderful" journey...

    (perhaps this helps somebody someone. Most presumably via some AI.....)

    #linux #systemd #hardening

  45. systemd is now 16 years old - and still I dislike it and everything around it. Heavily.

    Recent events forced me to dig waaay deeper into it than I wanted to.

    To make this story short:

    `systemd-analyze security [name].service` is a neat tool which has shown me quite a bit of effort there is in systemd (and yes, I still dislike all of it!)

    And one shouldn't set `ProtectHome=true` and try to start a service in ~/[service].

    Of course, if the error had been something different than `203/EXEC` I probably wouldn't have had this "wonderful" journey...

    (perhaps this helps somebody someone. Most presumably via some AI.....)

    #linux #systemd #hardening

  46. systemd is now 16 years old - and still I dislike it and everything around it. Heavily.

    Recent events forced me to dig waaay deeper into it than I wanted to.

    To make this story short:

    `systemd-analyze security [name].service` is a neat tool which has shown me quite a bit of effort there is in systemd (and yes, I still dislike all of it!)

    And one shouldn't set `ProtectHome=true` and try to start a service in ~/[service].

    Of course, if the error had been something different than `203/EXEC` I probably wouldn't have had this "wonderful" journey...

    (perhaps this helps somebody someone. Most presumably via some AI.....)

    #linux #systemd #hardening

  47. This week in #fedora #linux it was less about Fedora and more about #systemd as I've had a bit of a weird week.

  48. This week in #fedora #linux it was less about Fedora and more about #systemd as I've had a bit of a weird week.

  49. This week in #fedora #linux it was less about Fedora and more about #systemd as I've had a bit of a weird week.

  50. This week in #fedora #linux it was less about Fedora and more about #systemd as I've had a bit of a weird week.

  51. This week in #fedora #linux it was less about Fedora and more about #systemd as I've had a bit of a weird week.

  52. nginx -s reload может не применить конфиг

    Пока идёт бинарный апгрейд nginx, systemctl reload nginx не применяет конфиг так, как вы думаете: в лучшем случае к половине процессов сервера, в худшем — вообще никуда. Код возврата ноль в обоих случаях, в error.log пусто. Что именно у вас — решает одна строчка в юните: -s reload бьёт по pid-файлу, а он после USR2 принадлежит новому мастеру; kill -s HUP $MAINPID бьёт по старому, а тот конфиг вообще не перечитывает, и это описано в документации nginx — в разделе про обновление исполняемого файла, куда по другому поводу не заходят. Это первая из пяти проверок. Я взял пять ходовых утверждений про reload в nginx, померил каждое на стенде — и получил результаты по обе стороны: три подтвердились, два развалились. Развалившиеся оказались интереснее. Не работают ровно те страшилки, что про слушающий сокет: listen ... reuseport бесшовность не ломает (inode’ы сокетов до и после reload одни и те же — их держит мастер, а не воркер), паузы в accept при reload не существует вовсе (msleep(100) стоит ПЕРЕД QUIT), а значит и арифметика про переполнение backlog на reload — про нагрузку, а не про reload. Зато подтвердилось то, о чём почти не пишут. keepalive_min_timeout оставляет уходящего воркера в живых, и тот обслуживает запросы, которых в момент reload ещё не существовало — по старому конфигу. А ngx_close_idle_connections не различает направление соединения, поэтому каждый reload сбрасывает пул keepalive к бэкендам — и с 1.29.7 это касается всех, у кого есть блок upstream : пул там включён по умолчанию, 32 соединения на воркер. Правило из первой части — «соединение, открытое до reload, нового конфига не увидит» — приходится переформулировать: держится старого конфига не соединение, а процесс. В конце — Traefik, у которого reload’а нет вовсе, и который умеет не применить конфиг своим способом: кольцевой буфер на одно сообщение и двухсекундный дроссель. nginx release-1.31.3, traefik v3.7.10, все опыты в репозитории, запуск одной командой.

    habr.com/ru/articles/1068364/

    #nginx #reload #nginx_s_reload #systemd #бинарный_апгрейд #keepalive #upstream #reuseport #backlog #traefik

  53. nginx -s reload может не применить конфиг

    Пока идёт бинарный апгрейд nginx, systemctl reload nginx не применяет конфиг так, как вы думаете: в лучшем случае к половине процессов сервера, в худшем — вообще никуда. Код возврата ноль в обоих случаях, в error.log пусто. Что именно у вас — решает одна строчка в юните: -s reload бьёт по pid-файлу, а он после USR2 принадлежит новому мастеру; kill -s HUP $MAINPID бьёт по старому, а тот конфиг вообще не перечитывает, и это описано в документации nginx — в разделе про обновление исполняемого файла, куда по другому поводу не заходят. Это первая из пяти проверок. Я взял пять ходовых утверждений про reload в nginx, померил каждое на стенде — и получил результаты по обе стороны: три подтвердились, два развалились. Развалившиеся оказались интереснее. Не работают ровно те страшилки, что про слушающий сокет: listen ... reuseport бесшовность не ломает (inode’ы сокетов до и после reload одни и те же — их держит мастер, а не воркер), паузы в accept при reload не существует вовсе (msleep(100) стоит ПЕРЕД QUIT), а значит и арифметика про переполнение backlog на reload — про нагрузку, а не про reload. Зато подтвердилось то, о чём почти не пишут. keepalive_min_timeout оставляет уходящего воркера в живых, и тот обслуживает запросы, которых в момент reload ещё не существовало — по старому конфигу. А ngx_close_idle_connections не различает направление соединения, поэтому каждый reload сбрасывает пул keepalive к бэкендам — и с 1.29.7 это касается всех, у кого есть блок upstream : пул там включён по умолчанию, 32 соединения на воркер. Правило из первой части — «соединение, открытое до reload, нового конфига не увидит» — приходится переформулировать: держится старого конфига не соединение, а процесс. В конце — Traefik, у которого reload’а нет вовсе, и который умеет не применить конфиг своим способом: кольцевой буфер на одно сообщение и двухсекундный дроссель. nginx release-1.31.3, traefik v3.7.10, все опыты в репозитории, запуск одной командой.

    habr.com/ru/articles/1068364/

    #nginx #reload #nginx_s_reload #systemd #бинарный_апгрейд #keepalive #upstream #reuseport #backlog #traefik

  54. nginx -s reload может не применить конфиг

    Пока идёт бинарный апгрейд nginx, systemctl reload nginx не применяет конфиг так, как вы думаете: в лучшем случае к половине процессов сервера, в худшем — вообще никуда. Код возврата ноль в обоих случаях, в error.log пусто. Что именно у вас — решает одна строчка в юните: -s reload бьёт по pid-файлу, а он после USR2 принадлежит новому мастеру; kill -s HUP $MAINPID бьёт по старому, а тот конфиг вообще не перечитывает, и это описано в документации nginx — в разделе про обновление исполняемого файла, куда по другому поводу не заходят. Это первая из пяти проверок. Я взял пять ходовых утверждений про reload в nginx, померил каждое на стенде — и получил результаты по обе стороны: три подтвердились, два развалились. Развалившиеся оказались интереснее. Не работают ровно те страшилки, что про слушающий сокет: listen ... reuseport бесшовность не ломает (inode’ы сокетов до и после reload одни и те же — их держит мастер, а не воркер), паузы в accept при reload не существует вовсе (msleep(100) стоит ПЕРЕД QUIT), а значит и арифметика про переполнение backlog на reload — про нагрузку, а не про reload. Зато подтвердилось то, о чём почти не пишут. keepalive_min_timeout оставляет уходящего воркера в живых, и тот обслуживает запросы, которых в момент reload ещё не существовало — по старому конфигу. А ngx_close_idle_connections не различает направление соединения, поэтому каждый reload сбрасывает пул keepalive к бэкендам — и с 1.29.7 это касается всех, у кого есть блок upstream : пул там включён по умолчанию, 32 соединения на воркер. Правило из первой части — «соединение, открытое до reload, нового конфига не увидит» — приходится переформулировать: держится старого конфига не соединение, а процесс. В конце — Traefik, у которого reload’а нет вовсе, и который умеет не применить конфиг своим способом: кольцевой буфер на одно сообщение и двухсекундный дроссель. nginx release-1.31.3, traefik v3.7.10, все опыты в репозитории, запуск одной командой.

    habr.com/ru/articles/1068364/

    #nginx #reload #nginx_s_reload #systemd #бинарный_апгрейд #keepalive #upstream #reuseport #backlog #traefik