Skip to content

Commit

Permalink
Merge pull request #66 from fixpoint/uwsgi-buffer-increase
Browse files Browse the repository at this point in the history
Uwsgi buffer increase (48K)
  • Loading branch information
fixpoint-hasan authored Dec 23, 2024
2 parents e95bee3 + bf20d8a commit 3115f28
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
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;

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

0 comments on commit 3115f28

Please sign in to comment.