Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 Coldfusion Servers, 1 SQL Server 1

Status
Not open for further replies.

Tuck007

Technical User
Apr 29, 2002
105
US
I have source files for the same application stored on different Coldfusion servers. Lets say we're testing and are running application Test on both servers but only the one database. Initially only one server (local to CF server1) can find the database. The second server (located at ISP) cannot find the database on the first try. On the second, the second server can find the database. Is there anything that could be blocking the connections? .:TUCK:.
 
Wow! You were able to connect to a local database from a non-local ISP?!? Any number of things could be blocking the connection (and usually are, so count yourself lucky that you're getting through at all).

I'd probably start with the firewall.

Then I'd check the ping times between the db server and the ISP. The fact that it can't connect the first time, but connects the second time leads me to believe that it can find the server the first time but it's timing out before it gets a valid response... then the second time it's cached enough of the request that it's able to pull data within the time allotted.

You'll want to figure the ping time into ColdFusion's time out settings. Hope it helps,
-Carl
 
Found that is the firewall. Last year, all the development of the applications was completed by a team in the Ukraine. They would use our test server with their devekopment server in the same way I'm now using my ISP's server with our server. The idea of using a seperate SQL server is pretty common. Yes, a lot of things can get in the way. For this situation I have decided to allow all incoming TCP and UDP to our server from my IPSs IP. Therefore, all my applications on the IPS server will be able to communicate with my SQL server on any port it needs. .:TUCK:.
 
I've made my changes to the firewall and still getting a report of No Database from my application. I even changed:
Code:
<cfif IsDefined(&quot;Form.closebool&quot;) AND  Form.closebool IS 1>
	<cfloop collection=&quot;#session#&quot; item=&quot;counter&quot;>
		<cfset Temp = StructDelete(Session, counter)>
	</cfloop>
	<cflocation url=&quot;index.cfm?fuseaction=clients&RequestTimeout=1200&quot;>
	<cfabort>
</cfif>
It was timeout of 600, I changed it to 1200. Any further suggestions? .:TUCK:.
 
Reply from 207.168.179.51: bytes=32 time=31ms TTL=120
Reply from 207.168.179.51: bytes=32 time=16ms TTL=120
Reply from 207.168.179.51: bytes=32 time=16ms TTL=120
Reply from 207.168.179.51: bytes=32 time=16ms TTL=120

Looks decent to me. Still having intermitent problems. .:TUCK:.
 

Hmmmm... if your firewall is set up properly, and your pings are decent (and they look to be), I'm not sure what's going on.

What timeout are you adjusting? The &quot;Timeout requests after (seconds)&quot; under settings, or the timeouts in the datasources themselves? You might need to try playing with all of the above. You might also check that your buffer sizes are adequate.

mmaddox's post gave me an idea for a workaround if you can't get anything else to work... I have no idea if it would work, let alone work well.

Basically it's to wrap a test query (or even your real query) inside a
Code:
<CFTRY>...<CFCATCH>
. If it fails, try to re-query (you said it usually works the second time... so it just might do it).

Something like:
Code:
<cfset runquery = true>
<cfset runqty = 1>
<cfloop condition = &quot;runquery EQ true&quot;> 
   <cftry>
      <CFQUERY NAME=&quot;myQuery&quot; ...>
         SELECT ...
      </CFQUERY>
      <CFIF myQuery.RecordCount GT 0>
           <!--- valid result set, no need to re-query --->
           <cfset runquery = false>
      </CFIF>
   <cfcatch type=&quot;database&quot;>
      <cfset runqty = runqty + 1>
      <cfif runqty GT 5>
           <!--- too many attempts, abort --->
           <cfset runquery = false>
      </cfif>
   </cfcatch>
   </cftry> 
</cfloop>

<cfif IsDefined(&quot;myQuery&quot;) AND IsQuery(myQuery) AND myQuery.RecordCount GT 0>
    Output your page
             :
             :
<cfelse>
    There was a problem with this application.<br />
    Please try again later.<br />
</cfif>

kinda complicated... and doesn't really solve the underlying issue... which would gnaw at me. But maybe it just might get your app up and running.
Hope it helps,
-Carl
 
Well, through some poor communication with my ISP and numerous test, I did get all the bugs worked out. Making the change to the firewall helped a lot! I also added ?fuseaction=clients&RequestTimeout=1200 to all my links that were not connecting. I don't have a clue if this helped, but that is something that I did. One DSN was not setup properly on my ISPs side. All the others I had them setup were able to verify. .:TUCK:.
 
Ahh... I hadn't noticed that before... you're using Fusebox?

You might test a few without the requesttimeout parameter and see if clearing up the firewall and the DSNs did the trick.

I hate changing too many factors at once... it makes it difficult to discern what changes actually had any effect.
Hope it helps,
-Carl
 
Yes, the developers use the Fusebox. We're no longer using the developers and I'm left with a handfull of complex Coldfusion applications. I have little Coldfusion knowledge myself, but I understand the basics. My fix worked with the firewall for a little while. All the DSNs on the ISP verified. I'm still not able to get into the databases. There is another factor that came up yesterday: our SSL Cert. expired on our server. I don't think that would effect database transmissions. I know that the applications themselves make use of the SSL. What do you think? .:TUCK:.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top