agnitumus Posted March 10, 2016 MPD5 + Radius + L2TP Нагрузка около 3К сессий Спонтанно падают все тонели и затем подымаются, как ни в чем не бывало ... Падают в любой момент ! В основном в через 4-5 дней . Ошибка в логах: Mar 10 21:29:52 gate mpd: [L2TP91_4-2108] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP27_1-1138] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP62_3-3416] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP131_2-1481] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP146_4-3351] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP122_4-3299] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP178_4-2783] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP145_4-3979] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP193_1-3998] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP151_3-1199] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP183_3-1649] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP164_1-2017] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP151_4-3332] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP135_2-3554] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP167_4-1353] ACCT: Couldn't start thread: Resource temporarily unavailable Чего вообще MPD может писать такую ошибку ? netstat -m в момент проблемы Заранее спасибо ! Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
zlolotus Posted March 11, 2016 MPD5 + Radius + L2TP Нагрузка около 3К сессий Спонтанно падают все тонели и затем подымаются, как ни в чем не бывало ... Падают в любой момент ! В основном в через 4-5 дней . Ошибка в логах: Mar 10 21:29:52 gate mpd: [L2TP91_4-2108] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP27_1-1138] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP62_3-3416] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP131_2-1481] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP146_4-3351] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP122_4-3299] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP178_4-2783] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP145_4-3979] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP193_1-3998] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP151_3-1199] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP183_3-1649] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP164_1-2017] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP151_4-3332] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP135_2-3554] ACCT: Couldn't start thread: Resource temporarily unavailable Mar 10 21:29:52 gate mpd: [L2TP167_4-1353] ACCT: Couldn't start thread: Resource temporarily unavailable Чего вообще MPD может писать такую ошибку ? netstat -m в момент проблемы Заранее спасибо ! Может быть, просто таймаут у сессий? Включите вебку и проанализируйте Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
GrandPr1de Posted March 11, 2016 vmstat -z показывайте, желательно перед\во время падения скорее всего лажа в буферах нетграфа Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
agnitumus Posted March 13, 2016 vmstat -z показывайте, желательно перед\во время падения скорее всего лажа в буферах нетграфа К сожалению не с ними ! проявилась новая фишка (может и была) Daemon overloaded, ignoring request. Видимо придеться Мотина подымать и просить объяснить почему может писать Daemon overloaded, ignoring request. И как побороть ... --- Тайм аутов при которых тонели могут упасть нет ! Единственная проблема буферов ITEM SIZE LIMIT USED FREE REQ FAIL SLEEP 64 Bucket: 536, 0, 587, 1, 641, 97, 0 128 Bucket: 1048, 0, 17517, 954, 20769, 68101, 0 Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
GrandPr1de Posted March 13, 2016 погуглить не? там вроде была где-то проблема на эту тему в гугле есть чего почитать Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
agnitumus Posted March 13, 2016 погуглить не? там вроде была где-то проблема на эту тему в гугле есть чего почитать Я как-бы в этой теме ооочень давно, и мой самый главный друг гугл и мозг (почитайте мои посты и найдите тупые вопросы) ! Думаю, ответ, как обойти, может знать создатель софта (задача не частая)! Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
GrandPr1de Posted March 14, 2016 (edited) ну может я показался слишком резким но запрос в гугл "mpd5 daemon overloaded" - первая ссыль на меиллисты, в которых сказано как обойти это дело и почему это происходит > if I undestand corectly, in order to increase the connection rate I need > to replace 60 with 600 and 10 with 100 like this: > > #define SETOVERLOAD(q) do { > int t = (q); > if (t > 600) { > gOverload = 100; > } else if (t > 100) { > gOverload = (t - 100) * 2; > } else { > gOverload = 0; > } > } while (0) > > Is this enough, or I need to modify something else ? It seems, enough. But, are you sure your L2TP client will waitfor overloaded daemon to complete connection? The change will proportionally increase responsiveness of mpd - it has not enough CPU horsepower to process requests timely. я считаю, что 3к сессий l2tp для mpd5 уже слишком много, масштабируйтесь горизонтально и будет счастье, ИМХО Edited March 14, 2016 by GrandPr1de Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
boco Posted March 14, 2016 не надо будить мотина. он человек занятой и давно не занимается mpd. судя по коду ошибки (EAGAIN), она возникает в paction_start при вызове pthread_create(). man говорит нам, что [EAGAIN] The system lacked the necessary resources to create another thread, or the system-imposed limit on the total number of threads in a process [PTHREAD_THREADS_MAX] would be exceeded. возможно, упираетесь в kern.threads.max_threads_per_proc или, ну не знаю, в лимит файловых дескрипторов. вообще, в нормальных условиях толпы acct threads быть не должно. они отрабатывают запрос (на каждый линк - своя) и завершаются. но если acct backend (радиус, например) не отвечает, могут висеть достаточно долго. так что либо ускоряйте радиус, либо убирайте (вариант - увеличивайте интервал) interim update, либо уменьшайте таймаут запроса к радиусу, либо увеличивайте max_threads_per_proc. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
agnitumus Posted March 14, 2016 ну может я показался слишком резким но запрос в гугл "mpd5 daemon overloaded" - первая ссыль на меиллисты, в которых сказано как обойти это дело и почему это происходит > if I undestand corectly, in order to increase the connection rate I need > to replace 60 with 600 and 10 with 100 like this: > > #define SETOVERLOAD(q) do { > int t = (q); > if (t > 600) { > gOverload = 100; > } else if (t > 100) { > gOverload = (t - 100) * 2; > } else { > gOverload = 0; > } > } while (0) > > Is this enough, or I need to modify something else ? It seems, enough. But, are you sure your L2TP client will waitfor overloaded daemon to complete connection? The change will proportionally increase responsiveness of mpd - it has not enough CPU horsepower to process requests timely. я считаю, что 3к сессий l2tp для mpd5 уже слишком много, масштабируйтесь горизонтально и будет счастье, ИМХО Прекрасная статья ! вот только помогла бы она мне только 5 Лет назад ! Сейчас в коде эта проблема решена ... Обсуждения причин и вариантов обхода там тоже нет ... У меня есть сервера с 10k клиентов pppoe и полет нормальный, а вот с l2tp видимо что-то есть ... Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...