Solved

ODBC Error Code = S1001 (Memory alocation error)

Posted on 2003-11-12
8
1,884 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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
 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…

830 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