[ACFUG Discuss] Re: [AFFUG Discuss] ColdFusion and MySQL

2009-07-08 Thread Cameron Childress
On Wed, Jul 8, 2009 at 10:13 AM, Clarke Bishop wrote:
> I am troubleshooting an application that uses ColdFusion 8 and MySQL.
> Intermittently, it throws the error below.

Clarke -

This was recently brought up on another mailing list - here is the
most useful reply I found in the thread - along with two potential
fixes.

-Cameron


-- Forwarded message --
From: Nicholas Kwiatkowski 
Date: Wed, Jun 17, 2009 at 2:10 PM
Subject: RE: mysql, CF8 and "maintain connections"

Mark,

This is particular with certain versions of MySQL.  MySQL decided to
change the way that compression happens within their protocol, which
essentially means that if you plan on using compression (which the
baked-in connector in CF does), things get broken.  In particular,
what I’ve found is that if a connection stays idle for more than 30
seconds, the server closes the connection, but doesn’t notify the
client (ColdFusion).  The result is the connection in ColdFusion tries
to push data down a pipe that is closed, and you get the Java error.

This can be fixed by one of two ways :

-  Turn off the maintain connections.  This means that a new
TCP socket will be connected for each query outside a transaction.
This can cause some overhead, but is not a big deal for 95% of the
ColdFUsion servers out there.

-  Install the latest MySQL/J Connector, and use the CFMX7
instructions to connect to mySQL (raw connection to java).  This is a
good fix for the issue.

This effects all mySQL servers over 5.2 I believe (I may be wrong on
this one, but I know it was somewhere in mysql 5 that it happened)

-Nick

-- 
Cameron Childress
Sumo Consulting Inc
http://www.sumoc.com
---
cell:  678.637.5072
aim:   cameroncf
email: camer...@gmail.com


-
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-





Re: [ACFUG Discuss] Re: [AFFUG Discuss] ColdFusion and MySQL

2009-07-08 Thread Jeremy Bruck
We have used MySQL with CF8 (windows server) on a site and we were  
getting this issue at different times.  Interesting thing was when the  
site was very active with lots of traffic, the problem wasn't as  
noticeable.   You would sporadically though have a 10 to 20 second  
delay in opening the page and in the logs during this time you would  
see the null pointer error.


Our metaphor to describe it was... "Their were X number of buses  
(threads) taking passengers (result sets) between 2 spots (mysql & cf)  
-- the problem is one of the buses would break down it would take  
10-20 seconds to fix/scrap the bus and get a new one in to handle the  
passengers."


We tried all the suggested fixes out there and couldn't ever find on  
that truly got rid of it for us and we were frustrating our clients  
too much.  It is my understand that this is ONLY a problem on windows  
servers - granted we never tested it on Linux but everyone including  
us that had the issue seemed to be on windows as well.  Our MS SQL  
sites on the same box had no issues or problems.


For us, we moved this single website over to Railo with the exact same  
code, database and server and haven't experienced any issues (db  
delays, etc) for the past 4 months now since changing over.  Yes, our  
MS SQL sites are still running CF8 on the same box as well.


Jeremy

--
Strategic Growth Services, LLC
Jeremy Bruck
jbr...@growstrategy.com


On Jul 8, 2009, at 12:01 PM, John Mason wrote:


Naturally this should be directly to the CF lists.

http://www.coldfusionjedi.com/forums/messages.cfm?threadid=2BDF68EF-19B9-E658-9DDB2C6260E2CD89

Check to see if the MySQL driver selected for the db wasn't the 3.x  
version. CF 8 has two different options.



John
ma...@fusionlink.com


Clarke Bishop wrote:

I am troubleshooting an application that uses ColdFusion 8 and MySQL.
Intermittently, it throws the error below.
I've seen on the web where others have had a similar problem. Have  
any of

you seen this? Do you know of a fix?

Thanks,

  Clarke


java.lang.NullPointerException at
com.mysql.jdbc.Statement.setMaxRows(Statement.java:2178) at
coldfusion 
.server.j2ee.sql.JRunStatement.setMaxRows(JRunStatement.java:214)

at coldfusion.sql.Executive.executeQuery(Executive.java:1276) at
coldfusion.sql.Executive.executeQuery(Executive.java:1008) at
coldfusion.sql.Executive.executeQuery(Executive.java:939) at
coldfusion.sql.SqlImpl.execute(SqlImpl.java:325) at
coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:831) at
coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:521) at
cfdbTest32ecfm1104898290.runPage(E:\web\engravedforever.com\WebTools 
\dbTest3
.cfm:20) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)  
at

coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370) at
coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java: 
273) at
coldfusion 
.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java: 
40) at

coldfusion.filter.PathFilter.invoke(PathFilter.java:86) at
coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at
coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java: 
74) at
coldfusion 
.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistence

Filter.java:28) at
coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at
coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at
coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at
coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)  
at

coldfusion.CfmServlet.service(CfmServlet.java:175) at
coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java: 
89) at

jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at
coldfusion 
.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletF

ilter.java:42) at
coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java: 
46) at

jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at
jrun.servlet.FilterChain.service(FilterChain.java:101) at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at
jrun 
.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java: 
286) at
jrun 
.servlet.ServletEngineService.dispatch(ServletEngineService.java: 
543) at
jrun 
.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java: 
203)

at
jrunx.scheduler.ThreadPool 
$DownstreamMetrics.invokeRunnable(ThreadPool.java:

320) at
jrunx.scheduler.ThreadPool 
$ThreadThrottle.invokeRunnable(ThreadPool.java:428

) at
jrunx.scheduler.ThreadPool 
$UpstreamMetrics.invokeRunnable(ThreadPool.java:26

6) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)



-
To unsubscribe from this list, simply ema

Re: [ACFUG Discuss] Re: [AFFUG Discuss] ColdFusion and MySQL

2009-07-08 Thread Teddy R. Payne
Jeremy,
You reminded me of a fix that I did for a client that resolved a few
issues.  I implemented Connector/J for the MySQL JDBC drivers.

http://www.mysql.com/products/connector/


Teddy R. Payne, ACCFD
Google Talk - teddyrpa...@gmail.com


Re: [ACFUG Discuss] Re: [AFFUG Discuss] ColdFusion and MySQL

2009-07-08 Thread Howard Fore
It's interesting that you note you didn't notice is as much when the site
was busy. One commenter on the MySQL bug db for this issue (http://bugs.
mysql.com/bug.php?id=27647) says that it looked to him like the CF driver
had dropped the connection and that the bug came when CF tried to use that
non-existent connection.

--
Howard Fore, howard.f...@hofo.com
"The worthwhile problems are the ones you can really solve or help solve,
the ones you can really contribute something to. ... No problem is too small
or too trivial if we can really do something about it." - Richard P. Feynman


On Wed, Jul 8, 2009 at 12:13 PM, Jeremy Bruck wrote:

> We have used MySQL with CF8 (windows server) on a site and we were getting
> this issue at different times.  Interesting thing was when the site was very
> active with lots of traffic, the problem wasn't as noticeable.   You would
> sporadically though have a 10 to 20 second delay in opening the page and in
> the logs during this time you would see the null pointer error.
>
> Our metaphor to describe it was... "Their were X number of buses (threads)
> taking passengers (result sets) between 2 spots (mysql & cf) -- the problem
> is one of the buses would break down it would take 10-20 seconds to
> fix/scrap the bus and get a new one in to handle the passengers."
>
> We tried all the suggested fixes out there and couldn't ever find on that
> truly got rid of it for us and we were frustrating our clients too much.  It
> is my understand that this is ONLY a problem on windows servers - granted we
> never tested it on Linux but everyone including us that had the issue seemed
> to be on windows as well.  Our MS SQL sites on the same box had no issues or
> problems.
>
> For us, we moved this single website over to Railo with the exact same
> code, database and server and haven't experienced any issues (db delays,
> etc) for the past 4 months now since changing over.  Yes, our MS SQL sites
> are still running CF8 on the same box as well.
>
> Jeremy
>
> --
> Strategic Growth Services, LLC
> Jeremy Bruck
> jbr...@growstrategy.com
>
>
> On Jul 8, 2009, at 12:01 PM, John Mason wrote:
>
>  Naturally this should be directly to the CF lists.
>>
>>
>> http://www.coldfusionjedi.com/forums/messages.cfm?threadid=2BDF68EF-19B9-E658-9DDB2C6260E2CD89
>>
>> Check to see if the MySQL driver selected for the db wasn't the 3.x
>> version. CF 8 has two different options.
>>
>>
>> John
>> ma...@fusionlink.com
>>
>>
>> Clarke Bishop wrote:
>>
>>> I am troubleshooting an application that uses ColdFusion 8 and MySQL.
>>> Intermittently, it throws the error below.
>>> I've seen on the web where others have had a similar problem. Have any of
>>> you seen this? Do you know of a fix?
>>>
>>> Thanks,
>>>
>>>  Clarke
>>>
>>>
>>> java.lang.NullPointerException at
>>> com.mysql.jdbc.Statement.setMaxRows(Statement.java:2178) at
>>>
>>> coldfusion.server.j2ee.sql.JRunStatement.setMaxRows(JRunStatement.java:214)
>>> at coldfusion.sql.Executive.executeQuery(Executive.java:1276) at
>>> coldfusion.sql.Executive.executeQuery(Executive.java:1008) at
>>> coldfusion.sql.Executive.executeQuery(Executive.java:939) at
>>> coldfusion.sql.SqlImpl.execute(SqlImpl.java:325) at
>>> coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:831) at
>>> coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:521) at
>>> cfdbTest32ecfm1104898290.runPage(E:\web\engravedforever.com
>>> \WebTools\dbTest3
>>> .cfm:20) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) at
>>> coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370) at
>>> coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at
>>> coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:273) at
>>>
>>> coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
>>> at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at
>>> coldfusion.filter.PathFilter.invoke(PathFilter.java:86) at
>>> coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at
>>> coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74)
>>> at
>>>
>>> coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistence
>>> Filter.java:28) at
>>> coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at
>>> coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at
>>> coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at
>>> coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at
>>> coldfusion.CfmServlet.service(CfmServlet.java:175) at
>>> coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
>>> at
>>> jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at
>>>
>>> coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletF
>>> ilter.java:42) at
>>> coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at
>>> jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at
>>> 

Re: [ACFUG Discuss] Re: [AFFUG Discuss] ColdFusion and MySQL

2009-07-08 Thread Jeremy Bruck

Howard,

That was the same thing we noticed - kind of why we kept going to the  
"broken bus metaphor" and that new user would have 10-20 sec waits  ;o)


We never did try to pinpoint what the "time delay" in traffic was  
though and ended up just changing.  IMHO Railo is working really well  
and our cloud tests in Amazon EC2 have been great as well.


We did try another driver but the challenge we have had over the years  
with other drivers in CF6-8 is that when it wasn't the driver  
"approved/optimized by adobe" that they would cause the app server to  
run much higher CPU's and a little slower data overall.  At MFG we  
tried several different drivers and different configs for speed and  
they always seemed to have adverse affects for us in other ways --  
granted the boxes were getting LOTS of traffic (millions of page  
views / month).  Granted it is worth a try as well and my past  
experience made us more skittish of it - YMMV.


Regards,
Jeremy

--
Strategic Growth Services, LLC
Jeremy Bruck
jbr...@growstrategy.com


On Jul 8, 2009, at 12:59 PM, Howard Fore wrote:

It's interesting that you note you didn't notice is as much when the  
site was busy. One commenter on the MySQL bug db for this issue (http://bugs.mysql.com/bug.php?id=27647 
) says that it looked to him like the CF driver had dropped the  
connection and that the bug came when CF tried to use that non- 
existent connection.


--
Howard Fore, howard.f...@hofo.com
"The worthwhile problems are the ones you can really solve or help  
solve, the ones you can really contribute something to. ... No  
problem is too small or too trivial if we can really do something  
about it." - Richard P. Feynman



On Wed, Jul 8, 2009 at 12:13 PM, Jeremy Bruck  
 wrote:
We have used MySQL with CF8 (windows server) on a site and we were  
getting this issue at different times.  Interesting thing was when  
the site was very active with lots of traffic, the problem wasn't as  
noticeable.   You would sporadically though have a 10 to 20 second  
delay in opening the page and in the logs during this time you would  
see the null pointer error.


Our metaphor to describe it was... "Their were X number of buses  
(threads) taking passengers (result sets) between 2 spots (mysql &  
cf) -- the problem is one of the buses would break down it would  
take 10-20 seconds to fix/scrap the bus and get a new one in to  
handle the passengers."


We tried all the suggested fixes out there and couldn't ever find on  
that truly got rid of it for us and we were frustrating our clients  
too much.  It is my understand that this is ONLY a problem on  
windows servers - granted we never tested it on Linux but everyone  
including us that had the issue seemed to be on windows as well.   
Our MS SQL sites on the same box had no issues or problems.


For us, we moved this single website over to Railo with the exact  
same code, database and server and haven't experienced any issues  
(db delays, etc) for the past 4 months now since changing over.   
Yes, our MS SQL sites are still running CF8 on the same box as well.


Jeremy

--
Strategic Growth Services, LLC
Jeremy Bruck
jbr...@growstrategy.com


On Jul 8, 2009, at 12:01 PM, John Mason wrote:

Naturally this should be directly to the CF lists.

http://www.coldfusionjedi.com/forums/messages.cfm?threadid=2BDF68EF-19B9-E658-9DDB2C6260E2CD89

Check to see if the MySQL driver selected for the db wasn't the 3.x  
version. CF 8 has two different options.



John
ma...@fusionlink.com


Clarke Bishop wrote:
I am troubleshooting an application that uses ColdFusion 8 and MySQL.
Intermittently, it throws the error below.
I've seen on the web where others have had a similar problem. Have  
any of

you seen this? Do you know of a fix?

Thanks,

 Clarke


java.lang.NullPointerException at
com.mysql.jdbc.Statement.setMaxRows(Statement.java:2178) at
coldfusion 
.server.j2ee.sql.JRunStatement.setMaxRows(JRunStatement.java:214)

at coldfusion.sql.Executive.executeQuery(Executive.java:1276) at
coldfusion.sql.Executive.executeQuery(Executive.java:1008) at
coldfusion.sql.Executive.executeQuery(Executive.java:939) at
coldfusion.sql.SqlImpl.execute(SqlImpl.java:325) at
coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:831) at
coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:521) at
cfdbTest32ecfm1104898290.runPage(E:\web\engravedforever.com\WebTools 
\dbTest3

.cfm:20) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) at
coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370) at
coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java: 
273) at
coldfusion 
.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java: 
40) at

coldfusion.filter.PathFilter.invoke(PathFilter.java:86) at
coldfu