Author | Topic: DbcloseAll at the end of request | |
---|---|---|
Marcin Stryjek | DbcloseAll at the end of request on Fri, 26 Aug 2005 10:56:30 +0200 Hi Is there any way to avoid closing tables at the end of request? We use our own functions to open and close tables wich stores informations of opened tables in an array. Using standard dbCloseAll() doesn't update this array and it leads to errors. I'm well aware that HTML protocol is "stateless" but I would prefer all opened tables to remain open to avoid time consuming actions. TIA Marcin Stryjek mstryjek@softar.com.pl | |
Phil Ide | Re: DbcloseAll at the end of request on Fri, 26 Aug 2005 15:58:16 +0100 Marcin, > Is there any way to avoid closing tables at the end of request? We use our > own functions to open and close tables wich stores informations of opened > tables in an array. Using standard dbCloseAll() doesn't update this array > and it leads to errors. > I'm well aware that HTML protocol is "stateless" but I would prefer all > opened tables to remain open to avoid time consuming actions. The threads never end - they just rturn the result and then sit idle waiting for a new request. Tables are not closed by default, so if yours are closing then you must be doing it yourself. Regards, Phil Ide ******************************************* * Xbase++ FAQ, Libraries and Sources: * * goto: http://www.idep.org.uk/xbase * * --------------------------------------- * * www.xodc.org.uk - openSource Dev-Center * ******************************************* Only death is fatal - life is not! | |
Marcin Stryjek | Re: DbcloseAll at the end of request on Mon, 29 Aug 2005 09:38:32 +0200 Uzytkownik "Phil Ide" <phil@xodc.org.uk> napisal w wiadomosci news:68uyyz128s8p.dlg@xodc.org.uk... > Marcin, > >> Is there any way to avoid closing tables at the end of request? We use >> our >> own functions to open and close tables wich stores informations of opened >> tables in an array. Using standard dbCloseAll() doesn't update this array >> and it leads to errors. >> I'm well aware that HTML protocol is "stateless" but I would prefer all >> opened tables to remain open to avoid time consuming actions. > > The threads never end - they just rturn the result and then sit idle > waiting for a new request. Tables are not closed by default, so if yours > are closing then you must be doing it yourself. > > Regards, > -- > Phil Ide > Hi again. To Mr. Phil Ide: According to Andreas Herdt :"Since the Html Protocol is stateless, the Waa performs a DbCloseAll at the end of each Request." (NG thread 'dbcloseall() error in MsgBox'). I checked and You're wrong. In fact any requests closes all opened tables with no way, I believe, to avoid it. To Mr. Bruce Anderson That's exactly the way we do it. Problem is: we do not store request's details in text files as you suggest but in tables wich by Alaska's WAA. Thank you both for help. Any other suggestions? Marcin Stryjek mstryjek@softar.com.pl | |
Phil Ide | Re: DbcloseAll at the end of request on Tue, 30 Aug 2005 12:31:43 +0100 Marcin, > To Mr. Phil Ide: > According to Andreas Herdt :"Since the Html Protocol is stateless, the > Waa performs a DbCloseAll at the end of each Request." (NG thread > 'dbcloseall() error in MsgBox'). I checked and You're wrong. In fact any > requests closes all opened tables with no way, I believe, to avoid it. Oops - something has changed then since WAA 1.6, because then it didn't. I apologise. Regards, Phil Ide ******************************************* * Xbase++ FAQ, Libraries and Sources: * * goto: http://www.idep.org.uk/xbase * * --------------------------------------- * * www.xodc.org.uk - openSource Dev-Center * ******************************************* Everyone makes mistakes, if not we'd be single! | |
Frans Vermeulen | Re: DbcloseAll at the end of request on Tue, 30 Aug 2005 14:32:03 +0200 Phil, > > According to Andreas Herdt :"Since the Html Protocol is stateless, the > > Waa performs a DbCloseAll at the end of each Request." (NG thread > > 'dbcloseall() error in MsgBox'). I checked and You're wrong. In fact any > > requests closes all opened tables with no way, I believe, to avoid it. > > Oops - something has changed then since WAA 1.6, because then it didn't. I > apologise. Don't be alarmed, it did not in 1.7, and 1.80 either, and I doubt that it does with 1.82, allthough I am not certain. Anyway if 1.82 does close the databases this should be corrected. It makes working with WAA in conjunction with ADS close to impossible. Somewhere in the history of this newsgroup I mention opening of a set of tables taking between 90 seconds and 3 minutes. If I had to open and close that set of tables for each request... Regards, Frans Vermeulen | |
Marcin Stryjek | Re: DbcloseAll at the end of request on Tue, 30 Aug 2005 14:58:28 +0200 Uzytkownik "Frans Vermeulen" <fransv@visspec.nl> napisal w wiadomosci news:0yyNw6VrFHA.2628@S15147418... > Phil, > >> > According to Andreas Herdt :"Since the Html Protocol is stateless, > the >> > Waa performs a DbCloseAll at the end of each Request." (NG thread >> > 'dbcloseall() error in MsgBox'). I checked and You're wrong. In fact >> > any >> > requests closes all opened tables with no way, I believe, to avoid it. >> >> Oops - something has changed then since WAA 1.6, because then it didn't. > I >> apologise. > > Don't be alarmed, it did not in 1.7, and 1.80 either, and I doubt that it > does > with 1.82, allthough I am not certain. Anyway if 1.82 does close the > databases > this should be corrected. It makes working with WAA in conjunction with > ADS > close to impossible. Somewhere in the history of this newsgroup I mention > opening > of a set of tables taking between 90 seconds and 3 minutes. If I had to > open > and close that set of tables for each request... > > Regards, > Frans Vermeulen > If it works that way it's a huge error, because, as I understand, one thread executing ones request may close tables opened by any other thread. It definitely leads to errors. Regards Marcin Stryjek | |
Boris Borzic | Re: DbcloseAll at the end of request on Tue, 30 Aug 2005 17:18:59 +0200 "Marcin Stryjek" <mstryjek@softar.com.pl> wrote in news:VATnDKWrFHA.7540@S15147418: > If it works that way it's a huge error, because, as I understand, one > thread executing ones request may close tables opened by any other > thread. It definitely leads to errors. No it does not. Database work areas are thread-local. You can transfer a work area into another thread by using DbRelease() / DbRequest(). Best regards, Boris Borzic news://news.Xb2.NET http://www.Xb2.NET http://www.SQLExpress.net industrial strength Xbase++ development tools | |
Thomas Braun | Re: DbcloseAll at the end of request on Tue, 30 Aug 2005 15:47:15 +0200 Frans Vermeulen wrote: > Don't be alarmed, it did not in 1.7, and 1.80 either, and I doubt that it > does with 1.82, allthough I am not certain. Most likely not - I doubt there has been much recent work done in the WAA area... but since I'm always closing all my dbf files at the end of each request I can't tell. > close to impossible. Somewhere in the history of this newsgroup I mention > opening of a set of tables taking between 90 seconds and 3 minutes. Hm. I can't remember this. And it would be quite unnormal. I've been using ADS for quite a long time and not even with Clipper did I have such long file open times... > If I had to open > and close that set of tables for each request... Well - I can feel what you mean Thomas | |
Frans Vermeulen | Re: DbcloseAll at the end of request on Tue, 30 Aug 2005 17:44:23 +0200 Thomas, > > close to impossible. Somewhere in the history of this newsgroup I mention > > opening of a set of tables taking between 90 seconds and 3 minutes. > > Hm. I can't remember this. And it would be quite unnormal. ROF'L, you should !!! You were the one asking me WTH I was doing having these kind of abnormal figures. I was just opening one Gb of dbf's of which the largest containing about a million records. Regularly packed so no vast amounts of deleted records. The only thing was that Ax_Locking was off. > I've been using ADS for quite a long time and not even with Clipper did I > have such long file open times... Clipper used to be quicker, and though 3 minutes was extreme, opening times of over 2 and a half minute were not occasional. Regards, Frans Vermeulen | |
Thomas Braun | Re: DbcloseAll at the end of request on Wed, 31 Aug 2005 08:44:16 +0200 Frans Vermeulen wrote: >> Hm. I can't remember this. And it would be quite unnormal. > > ROF'L, you should !!! LOL - this proves once again that I'm not getting any younger. Thomas | |
Rodd Graham | Re: DbcloseAll at the end of request on Tue, 30 Aug 2005 16:46:56 -0500 Frans, > close to impossible. Somewhere in the history of this newsgroup I mention > opening > of a set of tables taking between 90 seconds and 3 minutes. If I had to > open > and close that set of tables for each request... FYI: I cache my DacSession object for reuse and open 70 tables with indexes on one ADS server in about 5 seconds. Not that I would want to open and close tables for every waa request. Rodd "Frans Vermeulen" <fransv@visspec.nl> wrote in message news:0yyNw6VrFHA.2628@S15147418... > Phil, > >> > According to Andreas Herdt :"Since the Html Protocol is stateless, > the >> > Waa performs a DbCloseAll at the end of each Request." (NG thread >> > 'dbcloseall() error in MsgBox'). I checked and You're wrong. In fact >> > any >> > requests closes all opened tables with no way, I believe, to avoid it. >> >> Oops - something has changed then since WAA 1.6, because then it didn't. > I >> apologise. > > Don't be alarmed, it did not in 1.7, and 1.80 either, and I doubt that it > does > with 1.82, allthough I am not certain. Anyway if 1.82 does close the > databases > this should be corrected. It makes working with WAA in conjunction with > ADS > close to impossible. Somewhere in the history of this newsgroup I mention > opening > of a set of tables taking between 90 seconds and 3 minutes. If I had to > open > and close that set of tables for each request... > > Regards, > Frans Vermeulen > | |
Anand Gupta | Re: DbcloseAll at the end of request on Wed, 07 Sep 2005 16:49:31 +0530 Tell us more about it Rodd. Am planning to start my work on conversion to ADS for a product of ours. Anand "Rodd Graham" <rodd@tpmco.com> wrote in message news:JIVwuzarFHA.2944@S15147418... > Frans, > > FYI: I cache my DacSession object for reuse and open 70 tables with > indexes on one ADS server in about 5 seconds. Not that I would want to > open and close tables for every waa request. > > Rodd > | |
Bruce Anderson | Re: DbcloseAll at the end of request on Fri, 26 Aug 2005 12:53:39 -0500 It can be done by creating your own data server application which manages the files and responds to requests from your WAA app. Essentially your app will be building text files containing ersatz SQL statements which get picked up by your data server app, and then it returns a record, or a block of records in the form of a text file. This is a lot of work for avoiding a tiny bit of overhead. The nice thing about stateless is that all of the tables are closed all of the time, a few milliseconds to the contrary. |