Solved

ODBC Error Code = S1001 (Memory alocation error)

Posted on 2003-11-12
8
1,736 Views
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)
0
Comment
Question by:kipmadden
8 Comments
 
LVL 6

Expert Comment

by:PE_CF_DEV
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.
0
 
LVL 6

Expert Comment

by:PE_CF_DEV
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.
0
 
LVL 1

Expert Comment

by:kjuliff
ID: 9732934
How do you "lock" session variables and how does this boost performance?
0
 
LVL 6

Accepted Solution

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

http://livedocs.macromedia.com/coldfusion/5.0/CFML_Reference/Tags57.htm

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.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:kipmadden
ID: 9733810
No applications are using Access or SQL server, everything is using Oracle 8.1.7.1 with ODBC 8.1.7.8 or Oracle 9.2.0.1 with ODBC 8.1.7.8.
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.

0
 
LVL 6

Expert Comment

by:PE_CF_DEV
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.
0
 
LVL 17

Expert Comment

by:anandkp
ID: 9737337
Hi,
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 ...
HTH

let me know ...

K'Rgds
Anand
0
 

Author Comment

by:kipmadden
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!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now