Fossil

Diff
Login

Differences From Artifact [a5cec09d63]:

To Artifact [e815589761]:


50
51
52
53
54
55
56

57
58
59
60
61
62
63
** Abort the current operation of the load average of the host computer
** is too high.
*/
void load_control(void){
  double mxLoad = atof(db_get("max-loadavg", 0));
  if( mxLoad<=0.0 || mxLoad>=load_average() ) return;


  style_header("Server Overload");
  @ <h2>The server load is currently too high.
  @ Please try again later.</h2>
  @ <p>Current load average: %f(load_average()).<br />
  @ Load average limit: %f(mxLoad)</p>
  style_finish_page("test");
  cgi_set_status(503,"Server Overload");







>







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
** Abort the current operation of the load average of the host computer
** is too high.
*/
void load_control(void){
  double mxLoad = atof(db_get("max-loadavg", 0));
  if( mxLoad<=0.0 || mxLoad>=load_average() ) return;

  style_set_current_feature("test");
  style_header("Server Overload");
  @ <h2>The server load is currently too high.
  @ Please try again later.</h2>
  @ <p>Current load average: %f(load_average()).<br />
  @ Load average limit: %f(mxLoad)</p>
  style_finish_page("test");
  cgi_set_status(503,"Server Overload");