Server application
Previous  Next

Your TradeControl installation comes with a server application, called TradeControlServer.

This application should be started when your server starts up, for e.g. in your rc.d or init.d.
Make sure you start the TradeControlServer in the right directory context. For e.g., create a startup script which does the following:-

(example)
cd /www/TCServer/
./TradeControlServer /cs


The TradeControl server has the following (optional) parameters:-

/test                              -           Starts a testrun, displays the results, and exists
/debug                          -           Starts the application in debugmode
/console                        -           Starts a console version. Normally a daemon gets spawned
/cs                                -           Safe mode. On some systems, libxml cant handle the fast throughput of TradeControl fast enough, and causes TradeControl to stop processing. This option forces TradeControl to use a locking mechanism when calling libxml routines.

You can stop the TradeControl server, by typing:
killall TradeControlServer

TradeControlServer will then properly exit, freeing all memory. Make sure, that in the last logfile in the logs directory, the last message line is 'TradeControl has been shut down.'.

Do not kill the server with killall -9 TradeControlServer, this will cause corrupt or incomplete data.

The server application is a very fast lightweight application, it should never take more than 0.5 load, depending on your system. On average, the application processes requests within 10ms.