Re: SQL Connections

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 59377
interpreted = N
texte = Hey, Brian - Within the page it remains unique, and the disconnect is not required unless you start another unique connect sequence. In the initial connect, it is valid for the whole page, then drops off. What about the same page firing simultaneously (sort of) with, say, 300 simultaneous Webserver hits on the same page - each with the same connection var name? Does this generate 300 connections in SQL, each named "conn1", and is that an issue? OR does it simply reference a unique connection, then drops, and other connections with the same name are not an issue? Strange logic. Larry On Sep 15, 2004, at 9:03 AM, Brian Fries wrote: > Larry - > > From what I understand, the variable name needs to be unique within > the page, unless you do a [sqldisconnect] to free up that variable for > reuse in a new connection. WebDNA automatically does the disconnect > when the page ends. > > I don't know if it would cause problems to use the same variable name > in multiple pages being executed at the same time in different > threads. > > You could use a variable named "c[cart]" or something similar to > ensure uniqueness. > > - Brian > > On Sep 15, 2004, at 8:55 AM, Larry Hewitt wrote: > >> In the WebDNA documentation, the SQLConnect connection variable is >> set as a text value; ex: conn_var=conn1 >> >> Does this have to be unique; is it better to assign a variable name >> going in (see beloe) so that conenctins have different values. It >> appears that MySQL handles multiple instances of "conn1" OK, but I >> was having issues last night with TOO MANY CONNECTIONS on our >> election primary night. >> >> Normally, it appears to be able to drop the connection quickly. We >> had an instance where the graphics server we use from our ISP was >> malfunctioning, and it appears that the pages loading so slowly >> causing the number of SQL connections to remain high, then max out. >> >> Is it an issue of number of max connections, or too many instances of >> a particular connection? >> >> I have a routine to create a random variable >> [text]conn1=[random][random][/text] >> then use [conn1] as the connection variable - resulting in a highly >> likely unique ID. But today the server is working fine the way it >> was. >> >> Any one with experience with this would be helpful - we are breaking >> our teeth in on SQL. More plusses than minuses at this point. >> >> TIA >> >> Larry > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ > > Larry Hewitt360.807.1100 OFFICE HCO, LLC360.807.1103 FAX 109 No. Tower360.880.4855 CELL P.O. Box 1017larryh@hewittco.com Centralia, WA 98531www.votewashington.org www.hewittco.com ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: SQL Connections ( Larry Hewitt 2004)
  2. Re: SQL Connections ( Brian Fries 2004)
  3. SQL Connections ( Larry Hewitt 2004)
Hey, Brian - Within the page it remains unique, and the disconnect is not required unless you start another unique connect sequence. In the initial connect, it is valid for the whole page, then drops off. What about the same page firing simultaneously (sort of) with, say, 300 simultaneous Webserver hits on the same page - each with the same connection var name? Does this generate 300 connections in SQL, each named "conn1", and is that an issue? OR does it simply reference a unique connection, then drops, and other connections with the same name are not an issue? Strange logic. Larry On Sep 15, 2004, at 9:03 AM, Brian Fries wrote: > Larry - > > From what I understand, the variable name needs to be unique within > the page, unless you do a [SQLdisconnect] to free up that variable for > reuse in a new connection. WebDNA automatically does the disconnect > when the page ends. > > I don't know if it would cause problems to use the same variable name > in multiple pages being executed at the same time in different > threads. > > You could use a variable named "c[cart]" or something similar to > ensure uniqueness. > > - Brian > > On Sep 15, 2004, at 8:55 AM, Larry Hewitt wrote: > >> In the WebDNA documentation, the SQLConnect connection variable is >> set as a text value; ex: conn_var=conn1 >> >> Does this have to be unique; is it better to assign a variable name >> going in (see beloe) so that conenctins have different values. It >> appears that MySQL handles multiple instances of "conn1" OK, but I >> was having issues last night with TOO MANY CONNECTIONS on our >> election primary night. >> >> Normally, it appears to be able to drop the connection quickly. We >> had an instance where the graphics server we use from our ISP was >> malfunctioning, and it appears that the pages loading so slowly >> causing the number of SQL connections to remain high, then max out. >> >> Is it an issue of number of max connections, or too many instances of >> a particular connection? >> >> I have a routine to create a random variable >> [text]conn1=[random][random][/text] >> then use [conn1] as the connection variable - resulting in a highly >> likely unique ID. But today the server is working fine the way it >> was. >> >> Any one with experience with this would be helpful - we are breaking >> our teeth in on SQL. More plusses than minuses at this point. >> >> TIA >> >> Larry > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ > > Larry Hewitt360.807.1100 OFFICE HCO, LLC360.807.1103 FAX 109 No. Tower360.880.4855 CELL P.O. Box 1017larryh@hewittco.com Centralia, WA 98531www.votewashington.org www.hewittco.com ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Larry Hewitt

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

HELP WITH DATES (1997) Not really WebCat- (1997) Help! WebCat2 bug (1997) RE: Cookies? (1997) WC2b15 - [HTMLx]...[/HTMLx] problems (1997) Sorting by multiple fields (2003) RE: Price recalc based on quantity (1997) WCS Newbie question (1997) WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997) OPEN MARKET PATENTS SOUND ECOMMERCE ALARM (1998) (1997) [WebDNA] max number of searches and lookups on a page (2016) Searching multiple fields from one form field (1997) [format] (1998) Possible Bug in 2.0b15.acgi (1997) [addfields] bombing 5.0 (2003) CAPTCHA system in webDNA (2005) [WebDNA] Talklist Archive & Twitter (2009) using showpage and showcart commands (1996) WC on Mac OS X or Mac OS X Server 2.x (2001)