Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Real running apps do not match apps in config Unit #1514

Open
Greenfactory opened this issue Dec 17, 2024 · 1 comment
Open

Real running apps do not match apps in config Unit #1514

Greenfactory opened this issue Dec 17, 2024 · 1 comment

Comments

@Greenfactory
Copy link

Hi.
I execute ./unit-bug.sh in my server.

Pay special attention to the app InternetApteka.offset_734.2024-12-16_00-00-01

P.S. This could probably be related to using
"http:$self->{sockPath}//control/applications/$app/restart"

curl --silent --unix-socket /var/run/control.unit.sock 'http://localhost/'
{
	"certificates": {},
	"js_modules": {},
	"config": {
		"listeners": {
			"*:8003": {
				"application": "InternetApteka.offset_744.2024-12-17_13-50-01"
			},

			"*:8004": {
				"application": "holdout-prod"
			},

			"*:8001": {
				"application": "personal-promo-prod"
			}
		},

		"routes": [],
		"applications": {
			"holdout-prod": {
				"type": "perl",
				"processes": 16,
				"script": "/SmCh/PP/unit/holdout/prod/holdout.psgi"
			},

			"personal-promo-prod": {
				"type": "perl",
				"processes": 16,
				"script": "/SmCh/PP/unit/personal-promo/prod/personal-promo.psgi"
			},

			"InternetApteka.offset_744.2024-12-17_13-50-01": {
				"processes": 8,
				"script": "./bin/unit-ia.psgi",
				"type": "perl",
				"working_directory": "/SmCh/IA/bin/..",
				"environment": {
					"appName": "InternetApteka.offset_744.2024-12-17_13-50-01",
					"SMCH_ROOT": "/SmCh/IA/bin/.."
				}
			}
		}
	},

	"status": {
		"modules": {
			"perl": {
				"version": "5.32.1",
				"lib": "/usr/lib/unit/modules/perl.unit.so"
			}
		},

		"connections": {
			"accepted": 193588,
			"active": 9,
			"idle": 8,
			"closed": 193571
		},

		"requests": {
			"total": 342756
		},

		"applications": {
			"holdout-prod": {
				"processes": {
					"running": 16,
					"starting": 0,
					"idle": 16
				},

				"requests": {
					"active": 0
				}
			},

			"personal-promo-prod": {
				"processes": {
					"running": 16,
					"starting": 0,
					"idle": 16
				},

				"requests": {
					"active": 0
				}
			},

			"InternetApteka.offset_744.2024-12-17_13-50-01": {
				"processes": {
					"running": 8,
					"starting": 0,
					"idle": 8
				},

				"requests": {
					"active": 0
				}
			}
		}
	}
}
ps ax | grep 'unit[:]'
    535 ?        Ss     0:01 unit: main v1.33.0 [/usr/sbin/unitd]
    543 ?        S      0:00 unit: controller
    544 ?        Sl     2:06 unit: router
  34817 ?        S      0:00 unit: "InternetApteka.offset_742.2024-12-17_02-00-02" prototype
  34835 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_02-00-02" application
  34853 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_02-00-02" application
  34855 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_02-00-02" application
  34856 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_02-00-02" application
  34857 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_02-00-02" application
  34858 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_02-00-02" application
  34859 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_02-00-02" application
  34860 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_02-00-02" application
  35654 ?        S      0:00 unit: "InternetApteka.offset_742.2024-12-17_03-00-01" prototype
  35655 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_03-00-01" application
  35661 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_03-00-01" application
  35665 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_03-00-01" application
  35668 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_03-00-01" application
  35673 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_03-00-01" application
  35674 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_03-00-01" application
  35675 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_03-00-01" application
  35677 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_03-00-01" application
  36439 ?        S      0:00 unit: "InternetApteka.offset_742.2024-12-17_04-00-02" prototype
  36441 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_04-00-02" application
  36443 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_04-00-02" application
  36444 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_04-00-02" application
  36445 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_04-00-02" application
  36446 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_04-00-02" application
  36447 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_04-00-02" application
  36459 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_04-00-02" application
  36463 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_04-00-02" application
  37217 ?        S      0:00 unit: "InternetApteka.offset_742.2024-12-17_05-00-01" prototype
  37218 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_05-00-01" application
  37219 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_05-00-01" application
  37224 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_05-00-01" application
  37225 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_05-00-01" application
  37227 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_05-00-01" application
  37228 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_05-00-01" application
  37229 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_05-00-01" application
  37230 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_05-00-01" application
  38004 ?        S      0:00 unit: "InternetApteka.offset_742.2024-12-17_06-00-01" prototype
  38006 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_06-00-01" application
  38017 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_06-00-01" application
  38018 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_06-00-01" application
  38022 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_06-00-01" application
  38023 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_06-00-01" application
  38027 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_06-00-01" application
  38028 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_06-00-01" application
  38029 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_06-00-01" application
  38861 ?        S      0:00 unit: "InternetApteka.offset_742.2024-12-17_07-00-01" prototype
  38862 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_07-00-01" application
  38863 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_07-00-01" application
  38864 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_07-00-01" application
  38865 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_07-00-01" application
  38866 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_07-00-01" application
  38867 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_07-00-01" application
  38870 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_07-00-01" application
  38884 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_07-00-01" application
  39634 ?        S      0:00 unit: "InternetApteka.offset_742.2024-12-17_08-00-02" prototype
  39648 ?        S      0:02 unit: "InternetApteka.offset_742.2024-12-17_08-00-02" application
  39650 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_08-00-02" application
  39655 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_08-00-02" application
  39656 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_08-00-02" application
  39657 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_08-00-02" application
  39658 ?        S      0:02 unit: "InternetApteka.offset_742.2024-12-17_08-00-02" application
  39659 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_08-00-02" application
  39660 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_08-00-02" application
  40447 ?        S      0:00 unit: "InternetApteka.offset_742.2024-12-17_09-00-01" prototype
  40449 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_09-00-01" application
  40450 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_09-00-01" application
  40453 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_09-00-01" application
  40459 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_09-00-01" application
  40461 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_09-00-01" application
  40468 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_09-00-01" application
  40470 ?        S      0:02 unit: "InternetApteka.offset_742.2024-12-17_09-00-01" application
  40471 ?        S      0:01 unit: "InternetApteka.offset_742.2024-12-17_09-00-01" application
  43808 ?        S      0:00 unit: "holdout-prod" prototype
  43809 ?        S      0:00 unit: "personal-promo-prod" prototype
  43810 ?        S      0:00 unit: "holdout-prod" application
  43811 ?        S      0:00 unit: "holdout-prod" application
  43812 ?        S      0:00 unit: "holdout-prod" application
  43813 ?        S      0:00 unit: "holdout-prod" application
  43814 ?        S      0:00 unit: "holdout-prod" application
  43815 ?        S      0:00 unit: "holdout-prod" application
  43816 ?        S      0:00 unit: "holdout-prod" application
  43817 ?        S      0:00 unit: "holdout-prod" application
  43818 ?        S      0:00 unit: "holdout-prod" application
  43819 ?        S      0:00 unit: "holdout-prod" application
  43820 ?        S      0:00 unit: "holdout-prod" application
  43821 ?        S      0:00 unit: "holdout-prod" application
  43822 ?        S      0:00 unit: "holdout-prod" application
  43823 ?        S      0:00 unit: "holdout-prod" application
  43824 ?        S      0:00 unit: "holdout-prod" application
  43825 ?        S      0:00 unit: "holdout-prod" application
  43826 ?        S      0:00 unit: "personal-promo-prod" application
  43827 ?        S      0:00 unit: "personal-promo-prod" application
  43828 ?        S      0:00 unit: "personal-promo-prod" application
  43829 ?        S      0:00 unit: "personal-promo-prod" application
  43830 ?        S      0:00 unit: "personal-promo-prod" application
  43831 ?        S      0:00 unit: "personal-promo-prod" application
  43832 ?        S      0:00 unit: "personal-promo-prod" application
  43833 ?        S      0:00 unit: "personal-promo-prod" application
  43834 ?        S      0:00 unit: "personal-promo-prod" application
  43835 ?        S      0:00 unit: "personal-promo-prod" application
  43836 ?        S      0:00 unit: "personal-promo-prod" application
  43837 ?        S      0:00 unit: "personal-promo-prod" application
  43838 ?        S      0:00 unit: "personal-promo-prod" application
  43839 ?        S      0:00 unit: "personal-promo-prod" application
  43840 ?        S      0:00 unit: "personal-promo-prod" application
  43841 ?        S      0:00 unit: "personal-promo-prod" application
  44738 ?        S      0:00 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" prototype
  44740 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44741 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44742 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44743 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44744 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44745 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44746 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44747 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44748 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44749 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44750 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44751 ?        S      0:00 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44795 ?        S      0:00 unit: "InternetApteka.offset_744.2024-12-17_13-50-01" prototype
  44796 ?        S      0:07 unit: "InternetApteka.offset_744.2024-12-17_13-50-01" application
  44797 ?        S      0:11 unit: "InternetApteka.offset_744.2024-12-17_13-50-01" application
  44798 ?        S      0:14 unit: "InternetApteka.offset_744.2024-12-17_13-50-01" application
  44799 ?        S      0:10 unit: "InternetApteka.offset_744.2024-12-17_13-50-01" application
  44800 ?        S      0:12 unit: "InternetApteka.offset_744.2024-12-17_13-50-01" application
  44801 ?        S      0:13 unit: "InternetApteka.offset_744.2024-12-17_13-50-01" application
  44804 ?        S      0:09 unit: "InternetApteka.offset_744.2024-12-17_13-50-01" application
  44805 ?        S      0:08 unit: "InternetApteka.offset_744.2024-12-17_13-50-01" application

To kill:

ps ax | grep 'unit[:]' | grep 2024-12-16

ps ax | grep 'unit[:]' | grep 2024-12-16 | awk '{print $1}' | xargs kill
  44738 ?        S      0:00 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" prototype
  44740 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44741 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44742 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44743 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44744 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44745 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44746 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44747 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44748 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44749 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44750 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44751 ?        S      0:00 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application

After kill:

ps ax | grep 'unit[:]' | grep 2024-12-16
  44910 ?        S      0:00 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" prototype
  44911 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44912 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44913 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44914 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44915 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44916 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44917 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44918 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44919 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44920 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44921 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
  44922 ?        S      0:01 unit: "InternetApteka.offset_734.2024-12-16_00-00-01" application
@Greenfactory
Copy link
Author

After

systemctl restart unit
{
	"certificates": {},
	"js_modules": {},
	"config": {
		"listeners": {
			"*:8003": {
				"application": "InternetApteka.offset_744.2024-12-17_14-40-01"
			},

			"*:8004": {
				"application": "holdout-prod"
			},

			"*:8001": {
				"application": "personal-promo-prod"
			}
		},

		"routes": [],
		"applications": {
			"holdout-prod": {
				"type": "perl",
				"processes": 16,
				"script": "/SmCh/PP/unit/holdout/prod/holdout.psgi"
			},

			"personal-promo-prod": {
				"type": "perl",
				"processes": 16,
				"script": "/SmCh/PP/unit/personal-promo/prod/personal-promo.psgi"
			},

			"InternetApteka.offset_744.2024-12-17_14-40-01": {
				"processes": 8,
				"script": "./bin/unit-ia.psgi",
				"type": "perl",
				"working_directory": "/SmCh/IA/bin/..",
				"environment": {
					"SMCH_ROOT": "/SmCh/IA/bin/..",
					"appName": "InternetApteka.offset_744.2024-12-17_14-40-01"
				}
			}
		}
	},

	"status": {
		"modules": {
			"perl": {
				"version": "5.32.1",
				"lib": "/usr/lib/unit/modules/perl.unit.so"
			}
		},

		"connections": {
			"accepted": 4437,
			"active": 0,
			"idle": 8,
			"closed": 4429
		},

		"requests": {
			"total": 7981
		},

		"applications": {
			"holdout-prod": {
				"processes": {
					"running": 16,
					"starting": 0,
					"idle": 16
				},

				"requests": {
					"active": 0
				}
			},

			"personal-promo-prod": {
				"processes": {
					"running": 16,
					"starting": 0,
					"idle": 16
				},

				"requests": {
					"active": 0
				}
			},

			"InternetApteka.offset_744.2024-12-17_14-40-01": {
				"processes": {
					"running": 8,
					"starting": 0,
					"idle": 8
				},

				"requests": {
					"active": 0
				}
			}
		}
	}
}
  46238 ?        Ss     0:00 unit: main v1.33.0 [/usr/sbin/unitd]
  46240 ?        S      0:00 unit: controller
  46241 ?        Sl     0:02 unit: router
  46403 ?        S      0:00 unit: "holdout-prod" prototype
  46404 ?        S      0:00 unit: "personal-promo-prod" prototype
  46405 ?        S      0:00 unit: "holdout-prod" application
  46406 ?        S      0:00 unit: "holdout-prod" application
  46407 ?        S      0:00 unit: "holdout-prod" application
  46408 ?        S      0:00 unit: "holdout-prod" application
  46409 ?        S      0:00 unit: "holdout-prod" application
  46410 ?        S      0:00 unit: "personal-promo-prod" application
  46411 ?        S      0:00 unit: "holdout-prod" application
  46412 ?        S      0:00 unit: "holdout-prod" application
  46413 ?        S      0:00 unit: "holdout-prod" application
  46414 ?        S      0:00 unit: "holdout-prod" application
  46415 ?        S      0:00 unit: "holdout-prod" application
  46416 ?        S      0:00 unit: "holdout-prod" application
  46417 ?        S      0:00 unit: "holdout-prod" application
  46418 ?        S      0:00 unit: "holdout-prod" application
  46419 ?        S      0:00 unit: "holdout-prod" application
  46420 ?        S      0:00 unit: "holdout-prod" application
  46421 ?        S      0:00 unit: "holdout-prod" application
  46422 ?        S      0:00 unit: "personal-promo-prod" application
  46423 ?        S      0:00 unit: "personal-promo-prod" application
  46424 ?        S      0:00 unit: "personal-promo-prod" application
  46425 ?        S      0:00 unit: "personal-promo-prod" application
  46426 ?        S      0:00 unit: "personal-promo-prod" application
  46427 ?        S      0:00 unit: "personal-promo-prod" application
  46428 ?        S      0:00 unit: "personal-promo-prod" application
  46429 ?        S      0:00 unit: "personal-promo-prod" application
  46430 ?        S      0:00 unit: "personal-promo-prod" application
  46431 ?        S      0:00 unit: "personal-promo-prod" application
  46432 ?        S      0:00 unit: "personal-promo-prod" application
  46433 ?        S      0:00 unit: "personal-promo-prod" application
  46434 ?        S      0:00 unit: "personal-promo-prod" application
  46435 ?        S      0:00 unit: "personal-promo-prod" application
  46436 ?        S      0:00 unit: "personal-promo-prod" application
  46438 ?        S      0:00 unit: "InternetApteka.offset_744.2024-12-17_14-40-01" prototype
  46439 ?        S      1:23 unit: "InternetApteka.offset_744.2024-12-17_14-40-01" application
  46440 ?        S      1:37 unit: "InternetApteka.offset_744.2024-12-17_14-40-01" application
  46441 ?        S      1:39 unit: "InternetApteka.offset_744.2024-12-17_14-40-01" application
  46442 ?        S      1:36 unit: "InternetApteka.offset_744.2024-12-17_14-40-01" application
  46443 ?        S      1:35 unit: "InternetApteka.offset_744.2024-12-17_14-40-01" application
  46444 ?        S      1:29 unit: "InternetApteka.offset_744.2024-12-17_14-40-01" application
  46446 ?        S      1:38 unit: "InternetApteka.offset_744.2024-12-17_14-40-01" application
  46466 ?        S      1:25 unit: "InternetApteka.offset_744.2024-12-17_14-40-01" application

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant