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

Uwsgi buffer increase (48K) #66

Merged
merged 3 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2024-12-16 Hasan Mahamudul <[email protected]>

* [nginx] client request header size の設定値を 2*32KB に変更しました。(#61)
* [uwsgi] request header size の設定値を 64KB に変更しました。(#61)

2024-11-29 Hasan Mahamudul <[email protected]>

* アイドル時の接続切断を防止するため、KompiraおよびKengineコンテナにて net.ipv4.tcp_keepalive_time を1800に設定しました。(#57)
Expand Down
18 changes: 18 additions & 0 deletions configs/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ server {
# アップロードファイルサイズのチェックを行わない
client_max_body_size 0;

### for KE: MAX_PATH_LENGTH=MAX_CHAR_LENGTH = 1024 ###
# for reading large client request header. A request line cannot exceed the size of one buffer
large_client_header_buffers 2 32k;
# for reading the first part of the response received from the uwsgi server
uwsgi_buffer_size 32k;
# for response body
uwsgi_buffers 2 32k;
uwsgi_busy_buffers_size 32k;

# djangoの静的ファイル(HTML、CSS、Javascriptなど)を管理
location /.static/ {
alias /var/opt/kompira/html/;
Expand All @@ -36,6 +45,15 @@ server {
# アップロードファイルサイズのチェックを行わない
client_max_body_size 0;

### for KE: MAX_PATH_LENGTH=MAX_CHAR_LENGTH = 1024 ###
# for reading large client request header. A request line cannot exceed the size of one buffer
large_client_header_buffers 2 32k;
# for reading the first part of the response received from the uwsgi server
uwsgi_buffer_size 32k;
# for response body
uwsgi_buffers 2 32k;
uwsgi_busy_buffers_size 32k;

fixpoint-hasan marked this conversation as resolved.
Show resolved Hide resolved
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
# ssl_password_file /etc/nginx/ssl/server.password;
Expand Down
1 change: 1 addition & 0 deletions ke2/services/kompira.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ services:
AUDIT_LOGGING_BACKUP: ${KOMPIRA_AUDIT_LOGGING_BACKUP:-${AUDIT_LOGGING_BACKUP:-365}}
AUDIT_LOGGING_WHEN: ${KOMPIRA_AUDIT_LOGGING_WHEN:-${AUDIT_LOGGING_WHEN:-MIDNIGHT}}
AUDIT_LOGGING_INTERVAL: ${KOMPIRA_AUDIT_LOGGING_INTERVAL:-${AUDIT_LOGGING_INTERVAL:-1}}
UWSGI_BUFFER_SIZE: 65536
hostname: ap-${HOSTNAME:?HOSTNAME must be set}
init: true
command: ["uwsgi"]
Expand Down