From 74cf2ce084a38031ea592903176e5374ecd3f38d Mon Sep 17 00:00:00 2001 From: REN Xiaolei Date: Thu, 14 Nov 2019 11:49:58 +0800 Subject: [PATCH 1/5] Update faq.rst and fix technical mistake on ulimit --- docs/source/faq.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/source/faq.rst b/docs/source/faq.rst index bd8f1d187..6531b99bf 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -128,10 +128,9 @@ How can I increase the maximum number of file descriptors? One of the first settings that usually needs to be bumped is the maximum number of open file descriptors for a given process. For the confused out there, remember that Unices treat sockets as files. - -:: - - $ sudo ulimit -n 2048 +Considering non-privileged users are not able to relax the limit, you should +firstly switch to root user, increase the limit, then run gunicorn. Using ``sudo +ulimit`` would not take effect. How can I increase the maximum socket backlog? ---------------------------------------------- From 9545e01d17e62fb1e959b6b18c7abe74ce99b9f1 Mon Sep 17 00:00:00 2001 From: REN Xiaolei Date: Mon, 18 Nov 2019 20:53:32 +0800 Subject: [PATCH 2/5] Update faq.rst --- docs/source/faq.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/faq.rst b/docs/source/faq.rst index 6531b99bf..b728084c2 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -128,10 +128,14 @@ How can I increase the maximum number of file descriptors? One of the first settings that usually needs to be bumped is the maximum number of open file descriptors for a given process. For the confused out there, remember that Unices treat sockets as files. + +.. warning:: Considering non-privileged users are not able to relax the limit, you should firstly switch to root user, increase the limit, then run gunicorn. Using ``sudo ulimit`` would not take effect. +Try systemd's service unit file, or an initscript which runs as root. + How can I increase the maximum socket backlog? ---------------------------------------------- From 5858f81566f812d5f12c107969d70162dc50eae7 Mon Sep 17 00:00:00 2001 From: REN Xiaolei Date: Mon, 18 Nov 2019 20:58:39 +0800 Subject: [PATCH 3/5] Update faq.rst --- docs/source/faq.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/faq.rst b/docs/source/faq.rst index b728084c2..55303122a 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -129,7 +129,7 @@ One of the first settings that usually needs to be bumped is the maximum number of open file descriptors for a given process. For the confused out there, remember that Unices treat sockets as files. -.. warning:: +.. warning:: ``sudo ulimit`` may not work Considering non-privileged users are not able to relax the limit, you should firstly switch to root user, increase the limit, then run gunicorn. Using ``sudo ulimit`` would not take effect. From c5a254ad9d3b46950a86d6b868cd6249c827b354 Mon Sep 17 00:00:00 2001 From: REN Xiaolei Date: Tue, 19 Nov 2019 16:32:43 +0800 Subject: [PATCH 4/5] Update faq.rst --- docs/source/faq.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/faq.rst b/docs/source/faq.rst index 55303122a..e98e4eb6a 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -130,7 +130,7 @@ of open file descriptors for a given process. For the confused out there, remember that Unices treat sockets as files. .. warning:: ``sudo ulimit`` may not work -Considering non-privileged users are not able to relax the limit, you should + Considering non-privileged users are not able to relax the limit, you should firstly switch to root user, increase the limit, then run gunicorn. Using ``sudo ulimit`` would not take effect. From 00b58979385c98a60c516b1b1963d2a91a7238d8 Mon Sep 17 00:00:00 2001 From: REN Xiaolei Date: Tue, 19 Nov 2019 16:34:40 +0800 Subject: [PATCH 5/5] Update faq.rst --- docs/source/faq.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/faq.rst b/docs/source/faq.rst index e98e4eb6a..a982f808e 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -130,7 +130,8 @@ of open file descriptors for a given process. For the confused out there, remember that Unices treat sockets as files. .. warning:: ``sudo ulimit`` may not work - Considering non-privileged users are not able to relax the limit, you should + +Considering non-privileged users are not able to relax the limit, you should firstly switch to root user, increase the limit, then run gunicorn. Using ``sudo ulimit`` would not take effect.