Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Why does my temp file keep growing?

4 posts in General Discussion Last posting was on 2005-01-27 21:36:35.0Z
Bill Aumen Posted on 2005-01-27 16:45:28.0Z
Sender: 5a2d.41f70a88.1804289383@sybase.com
From: Bill Aumen
Newsgroups: ianywhere.public.general
Subject: Why does my temp file keep growing?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <41f91aa4.7766.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 27 Jan 2005 08:45:24 -0800, 10.22.241.42
Lines: 14
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 27 Jan 2005 08:45:25 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 27 Jan 2005 08:45:28 -0800
X-Trace: forums-1-dub 1106844328 10.22.108.75 (27 Jan 2005 08:45:28 -0800)
X-Original-Trace: 27 Jan 2005 08:45:28 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4099
Article PK: 7981

Our temp file asat0000.tmp seems to keep growing in size. I
think I understand the reasons for the temp file from the
documentation and other postings. But I am wondering why the
space has not been freed up when there is no one connected?

It keeps growing until it fills up the disk and crashes our
server every few weeks.

ASA 9.0.1.1922 running on Windows 2000, 5.00.2195 Svc Pack 4



Thanks,
Bill


Greg Fenton Posted on 2005-01-27 16:52:24.0Z
From: Greg Fenton <greg.fenton_NOSPAM_@ianywhere.com>
Organization: iAnywhere Solutions Inc.
User-Agent: Mozilla Thunderbird 1.6.3.2f (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Why does my temp file keep growing?
References: <41f91aa4.7766.1681692777@sybase.com>
In-Reply-To: <41f91aa4.7766.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vpn-concord-086.sybase.com
X-Original-NNTP-Posting-Host: vpn-concord-086.sybase.com
Message-ID: <41f91c48$1@forums-1-dub>
Date: 27 Jan 2005 08:52:24 -0800
X-Trace: forums-1-dub 1106844744 158.159.8.86 (27 Jan 2005 08:52:24 -0800)
X-Original-Trace: 27 Jan 2005 08:52:24 -0800, vpn-concord-086.sybase.com
Lines: 28
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4100
Article PK: 7982


Bill Aumen wrote:
> Our temp file asat0000.tmp seems to keep growing in size. I
> think I understand the reasons for the temp file from the
> documentation and other postings. But I am wondering why the
> space has not been freed up when there is no one connected?
>

The temp file is created by the server when it needs more room to do its
work than is available in memory. The file is used until the server is
shut down. The file never shrinks, but its space is reused by
subsequent workloads.

If you see that the file continues to grow, it is because the server's
workload is getting larger over time. In other words, subsequent
queries are forcing the engine to use more temporary space than in
previous queries.

So you are facing a problem of either inefficient queries or
insufficient memory/diskspace for the requirements of your application.

greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/


Bill Aumen Posted on 2005-01-27 18:23:30.0Z
Sender: afc.41f930db.1804289383@sybase.com
From: Bill Aumen
Newsgroups: ianywhere.public.general
Subject: Re: Why does my temp file keep growing?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <41f931a2.b05.1681692777@sybase.com>
References: <41f91c48$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 27 Jan 2005 10:23:30 -0800
X-Trace: forums-1-dub 1106850210 10.22.241.41 (27 Jan 2005 10:23:30 -0800)
X-Original-Trace: 27 Jan 2005 10:23:30 -0800, 10.22.241.41
Lines: 33
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4101
Article PK: 7983

Thanks Greg. I thought there was a problem with the file.

> Bill Aumen wrote:
> > Our temp file asat0000.tmp seems to keep growing in
> > size. I think I understand the reasons for the temp file
> > from the documentation and other postings. But I am
> > wondering why the space has not been freed up when there
> > is no one connected?
>
> The temp file is created by the server when it needs more
> room to do its work than is available in memory. The
> file is used until the server is shut down. The file
> never shrinks, but its space is reused by subsequent
> workloads.
>
> If you see that the file continues to grow, it is because
> the server's workload is getting larger over time. In
> other words, subsequent queries are forcing the engine to
> use more temporary space than in previous queries.
>
> So you are facing a problem of either inefficient queries
> or insufficient memory/diskspace for the requirements of
> your application.
>
> greg.fenton
> --
> Greg Fenton
> Consultant, Solution Services, iAnywhere Solutions
> --------
> Visit the iAnywhere Solutions Developer Community
> Whitepapers, TechDocs, Downloads
> http://www.ianywhere.com/developer/


Glenn Paulley Posted on 2005-01-27 21:36:35.0Z
Newsgroups: ianywhere.public.general
Subject: Re: Why does my temp file keep growing?
From: Glenn Paulley <paulley@ianywhere.com>
References: <41f91aa4.7766.1681692777@sybase.com>
Organization: iAnywhere Solutions
Message-ID: <Xns95EBA8F6C5690paulleyianywherecom@10.22.241.106>
User-Agent: Xnews/5.04.25
NNTP-Posting-Host: vpn-dub-195.sybase.com
X-Original-NNTP-Posting-Host: vpn-dub-195.sybase.com
Date: 27 Jan 2005 13:36:35 -0800
X-Trace: forums-1-dub 1106861795 10.22.120.195 (27 Jan 2005 13:36:35 -0800)
X-Original-Trace: 27 Jan 2005 13:36:35 -0800, vpn-dub-195.sybase.com
Lines: 101
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4103
Article PK: 7988

With 9.x releases, you have two options at your disposal to deal with
unanticipated temp file growth:

(1) Enable the TEMP_SPACE_LIMIT_CHECK option

The engine can now check the amount of temporary file space that a
connection uses, and if it is greater than its allowable quota (see
below), fail the request. This check is enabled by a new public option
'Temp_space_limit_check', which defaults to 'Off'. When 'Off', no limit
checking occurs. If enabled, and a connection uses more than its quota
of temporary file space, then the connection will fail with an
SQLSTATE_TEMP_SPACE_LIMIT.

A connection's temporary file quota is based on two factors: the maximum
size of the temp file (i.e., the maximum size it can grow to), and the
number of active database connections. The maximum size of the tempfile
is calculated as the sum of its current size and the amount of disk space
available on the partition containing it. When limit checking is
enabled, a connection will be checked for quota violation only after the
temp file has grown to 80% or more of its maximum size, AND it requests
more temp file space. When this occurs, any connection that uses more
than the maximum temp file space divided by the number of active
connections will fail with the above SQL error.

(2) In addition to the above, with 9.0.2 we introduced a new feature
entitled disk-full callback support:

The engine now has support for calling out to an external, user supplied
function in the event of a filesystem failure resulting from a disk-full
error. This gives applications an opportunity to be notified of, and
possibly take some corrective action on filesystem-full conditions. The
previous engine behaviour was to stop the engine with a fatal error.

One new command line option has been added to the engine:
-fc <file>
which takes the file name of the DLL containing the disk-full callback.

If the -fc option is specified, during startup the engine will attempt to
load the DLL and resolve the entry-point of the callback function. If
either the DLL or entry-point cannot be found the engine will display an
error message and exit.

When the engine detects a disk-full condition it will invoke the callback
(if provided), passing it the filename of the dbspace where the condition
was triggered, along with the OS specific error code from the failed
operation. The signature of the callback is defined as:

a_sql_uint32 _entry xp_out_of_disk( const char* db_file_name, int
error_code );

The return code from the call to "xp_out_of_disk" indicates whether or
not the offending filesystem operation should be aborted (i.e., stop the
server with a fatal error), or retried. If non-zero is returned it will
be aborted, otherwise it will be retried. The callback will be
repeatedly invoked as long as it returns 0 and the filesystem operation
fails.

On Windows platforms, if the engine has been started with a console
screen (i.e., -qw or -qi have not been specified) an additional mechanism
for handling disk-full conditions is available. If a callback DLL has
not been provided and a disk-full condition is encountered, a dialog box
will be displayed, allowing the user to retry or abort the operation.
This gives a user an opportunity to effect manual corrective action. The
dialog displays the same information that is passed to the callback,
namely the filename and system error code.

Hope this helps

Glenn

Bill Aumen wrote in news:41f91aa4.7766.1681692777@sybase.com:

> Our temp file asat0000.tmp seems to keep growing in size. I
> think I understand the reasons for the temp file from the
> documentation and other postings. But I am wondering why the
> space has not been freed up when there is no one connected?
>
> It keeps growing until it fills up the disk and crashes our
> server every few weeks.
>
> ASA 9.0.1.1922 running on Windows 2000, 5.00.2195 Svc Pack 4
>
>
>
> Thanks,
> Bill

--
Glenn Paulley
Research and Development Manager, Query Processing
iAnywhere Solutions Engineering

EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all

To Submit Bug Reports: http://casexpress.sybase.com/cx/cx.stm

SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288