Skip to content

Commit

Permalink
1,show warning notify when save config failed
Browse files Browse the repository at this point in the history
2,set client_body_buffer_size prevent save config failed because post body has been saved to disk by nginx
  • Loading branch information
alexazhou committed Aug 8, 2016
1 parent a984b59 commit 6d4afde
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ http {

#keepalive_timeout 0;
keepalive_timeout 65;
client_body_buffer_size 128k;

#gzip on;

Expand Down
2 changes: 1 addition & 1 deletion verynginx/dashboard/js/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ config.save_config = function(){
config.refresh_bottom_bar();
dashboard.notify("Save config success.");
}else{
dashboard.notify("Save config failed [" + data['err'] + "].");
dashboard.show_notice( 'warning', "Save config failed [" + data['err'] + "].");
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion verynginx/lua_script/module/status.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ function _M.init()

local ok, err = ngx.shared.status:add( KEY_STATUS_INIT,true )
if ok then
ngx.shared.status:set( KEY_START_TIME, ngx.time() )
ngx.shared.status:set( KEY_TOTAL_COUNT, 0 )
ngx.shared.status:set( KEY_TOTAL_COUNT_SUCCESS, 0 )
ngx.shared.status:set( KEY_START_TIME, ngx.time() )

ngx.shared.status:set( KEY_TRAFFIC_READ, 0 )
ngx.shared.status:set( KEY_TRAFFIC_WRITE, 0 )
Expand Down

0 comments on commit 6d4afde

Please sign in to comment.