Home Server
New Blog Posts: Merging Reports - Part 1 and Part 2

Server does not reuse running sessions

Hi,

using TrsServer and TrsReportExplorerVolume I can see that a running session will always be used only for one time. After TrsServer.timeout seconds the session is removed. Is there any property which have to be set that sessions can be "reused" again. Each session is loading the folder and items list to find the report. At least this is very "expensive"

Best regards

Comments

  • Hi Sven,

    Server.TimeOut specifies time in seconds that a session can be idle (no request received from client).

    ReportExplorerVolume.DirectoryOptions has properties EnableCaching and RefreshInterval. Default values are True and 60 seconds. RB Server caches the folder/items information in a singleton.

    Configure ReportExplorerVolume to use ItemPipeline and ItemTemplatePipeline. This optimizes performance of building the folder/items and loading templates. (See demos for details). It's not 'expensive' if you have this configured correctly. :smile:







    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • thats what i did (I used the DOA-Example). If a client connects to the server the session is build, the reports run. The client disconnects the sessions. A few seconds later a new session is made but this will open a new session on the server (and will not reuse the already opened server session). And, my problem since years, I can open only one session a time. If i do this the server runs without any problem. If I open two (or more sessions at the same time) the server will crash (either after several seconds or after hours, but the server will crash. For sure something is not threadsafe. But I only use the DOA-example.
  • Hi Sven,

    I Googled a bit. DOA and FireDAC both have a feature called 'session pooling' or 'connection pooling'. The concept is that when configured to use pooling, the TOracleSession or TFDConnection object when set to connected will internally reuse a database session. Give that a try. (The DOA web site mentions the feature, there is a TOracleSessionPool component). The Delphi FireDAC docs has details for using connection pooling with FireDAC).

    For debugging a crashing issue, try using EurekaLog or MadExcept. I think both can be configured for a multi-threaded server environment. These tools can log detail information, including stack trace when an exception occurs).

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
Sign In or Register to comment.