Debugging

The following three parameters are most frequently used for debugging RESTful API:

  • debugrest
  • dao_threadsperprocess
  • dao_sessiontimeout

It is also useful to use the msglog:1 parameter to have all messages written to the sm.log as well.

The debugrest parameter

Add the debugrest in sm.ini or in the dedicated servlet container line of the sm.cfg file, restart the Service Manager and re-run the RESTful Web service application to invoke debugging parameter. It provides more detailed log trace for diagnostics.

The dao_threadsperprocess parameter

Similar to debugrest, it can be set in sm.ini or in the dedicated servlet container line of sm.cfg file

It means the maximum number of threads allowed concurrently running in the process for RESTful Web Service application. It can be defined in sm.ini and the default value is 10. It is better to start enough server threads to handle requests (suggest to maintaining the buffer of 30%~ 40% spare capacities).

The dao_sessiontimeout parameter

Like debugrest, the dao_sessiontimeout parameter can be set in sm.ini or in the dedicated servlet container line of sm.cfg file.

It indicates the seconds to wait before terminate the RESTful threads. It can be defined in sm.ini and the default value is 15 seconds. Unless the client sends subsequent requests within the timeout, the Service Manager server will recycle the session for re-use and re-allocate it on demand.

If there is big divergence, it is recommended to connect several servlets with different thresholds.