ODBC Error Code = S1001 (Memory alocation error)

Posted on 2003-11-12
Last Modified: 2013-12-20
Our group has had this error code kill our Coldfusion server many times now.  At first we thought it was a specific application and so I rewrote the app in PL/SQL to bypass the CF server, but then the error started occuring with seemingly random applications of all flavors.  Our IT department replaced the server box with another box that has 4Gigs of memory and we thought the issue was resolved until it cropped up again.
I've read that locking down session and application variables as well as fine-tuning queries to pass as little info as possible will help but this has done nothing to prevent the problem from continuing.  Is anyone aware of why this issue might occur and what the remedy is?

Here's some detail of our environment:
We have CF Server 5.0 running on NT 5.0 Service Pack 3 OS Build 2195.
Application variables time out in 2days (default and maximum)
Session variable time out in 4 hours (default and maximum)
Question by:kipmadden
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 9732899
Are any of the applications using Access or are they using SQL server?

Is the error originating from ColdFusion? Becuase an ODBC error code ussually means the Database is throwing the errior not ColdFusion, coldfusion just reports it. Check your datasources in ColdFusion look at advanced settings.

I would reccomend making sure Maintain connections across client requests is NOT checked.

Expert Comment

ID: 9732908
Oh and in ColdFusion 5 it is VERY important to make sure you lock your application and session variables aside from performance boosts if you don't lock them you are open to get race conditions and the valuescould become inaccurate.

Expert Comment

ID: 9732934
How do you "lock" session variables and how does this boost performance?
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.


Accepted Solution

PE_CF_DEV earned 300 total points
ID: 9733111
This should give you the information you are after:

The baisc idea in performance is not so much that it will increase the speed of your application, infact inproper use of locks will decrease your overall speed of execution. They do help with performance as far as efficient memory usage and accurate information.

Also I did some research on the error code at question. It might be hardware related, like your hard drive space? Maybe check and see what your virtual memory usage is at.

Author Comment

ID: 9733810
No applications are using Access or SQL server, everything is using Oracle with ODBC or Oracle with ODBC
Maintain connections across client requests IS checked.  
By unchecking this won't performance be hit significantly?
Does unchecking this force CF to create a new DB connection each time a CFQUERY is run?  
That is the reason I gave up using PERL with the DBI - creating a new DB connection each time I had to do a query killed the application speed.


Expert Comment

ID: 9734228
oh duh PL/SQL... should of known you were using oracle...

From macromedia's help:
"ColdFusion establishes a connection to a data source for every operation that requires one. Select this option [maintain connections] to improve performance by caching the data source connection."

I would be willing to bet this is the cuase for the error. Most of the time you see this error with Access b/c it has memory leaks out the wahzoo. If you have a whole heap load of connections to oracle though you may see the same type of errors.
If you limit the ammount of connections that can be made to the DB that might keep the error from coming up. I have always looked at maintian connections as a fall back to a problem not a solution to the problem, the true solution should be limiting the number of times you are connecting to a database or use stored procedures.
LVL 17

Expert Comment

ID: 9737337
Is there a possibility of some query - which is taking too much time to execute or putting too much load on the server & causing it to throw the error.

try & see if u can find out from the log to know which pages are slow & are taking too much time to execute.

identify them & chk the queries / procedures called on that page - get them tuned & things shld be resolved.

thats from my personal experience ...

let me know ...


Author Comment

ID: 9740941
After reading more on the topic and using the CF Administrator to set the "Full Checking" of cflocks it was discovered that several SESSION scope variables were not locked properly.  Since it is very difficult to reproduce the problem I'll have to assume that this was the issue.

Unchecking the "Maintain Connections" however slows the performance down so much that I'd rather have the server run fast and die once a week from a memory allocation error than have it be constantly crawling along.  Also I'm not quite sure how to "check" virtual memory usage since you allocate the virtual memory and there doesn't seem to be a way to find out how much is actually being used.

Thanks for the help!

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Now that Expression Web 4.0 ( is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: : Go t…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question