Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-22-2003, 03:24 PM   #1
LQ Newbie
Registered: Jul 2003
Posts: 2

Rep: Reputation: 0
Question Numerous scb_*.tmp files in /tmp

We have a java server application running on Redhat Linux 8.0 that accepts transactions over TCP/IP and processes those transactions by connecting to Microsoft SQL Server (running on another machine, obviously) using Microsoft's SQL Server JDBC driver.

This app also uses sockets to communicate between three separate JVMs that may be on different servers (but are all on the same server in this case).

Over time, the number of open file descriptors held by the java processes grows until it reaches the per-process limit imposed by Linux. At this point the application fails due to the inability to obtain more file descriptors. This usually manifests itself as an inability to open a new database connection.

The app's VMs are currently using native threads.

When I observe the actual file descriptors in use over time, here is what I find:
- Each java thread has descriptors for all the java .jar files and libraries it needs, as well as any Linux libraries it needs. This number remains very constant over time.
- Each java thread has descriptors for the sockets or serversockets it has open. This number also remains constant over time.
- Certain threads (the ones that acquire and use connections to the database) have a number of file descriptors open to files of the form /tmp/scb_<n>.tmp where <n> is a number with a variable number of digits (e.g. /tmp/scb_58474.tmp). The number of these files that are open grows over time, and is roughly equal to the number of transactions that have been processed.

Clearly, the scb_* files are the problem. Our code is not creating these files. I am suspicious that the MS SQL Server JDBC driver might be, but I don't know that yet.

Has anyone seen files like these before, and do you have any idea where they're coming from?
Old 07-22-2003, 07:23 PM   #2
Registered: May 2003
Location: USA
Distribution: Fedora 21, RHEL 5,6&7, Windoze 7
Posts: 235

Rep: Reputation: 31
that does sound odd. you could try this rm -f scb_*.tmp and see who, if
anyone, complains. If this is a mission critical server and you have no
fallover or backup you may want to try something else first. But then again,
if it is mission critical you'll need to resolve the problem ASAP. So........
Well, have you tryed catting the file or running strings on any of them just
to see if you get info from them? try and see if not.
let me know what happens.

Last edited by youngstorm; 07-22-2003 at 07:25 PM.
Old 08-18-2003, 12:45 PM   #3
LQ Newbie
Registered: Jul 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for your response.

Shortly after I posted my question, our customer decided to put the Linux port on hold, so we've moved all their transaction processors back to Windows 2000.

In the process, I was able to show that it was indeed the Microsoft SQL Server JDBC driver that was creating the scb_* files. It exhibited the same behavior on Windows 2000.

Hopefully in the not-too-distant future we'll be porting the transaction processors back to Linux. I think we'll try a different JDBC driver then. Who know, by then the database servers might be Oracle on Linux...

Old 08-18-2003, 04:28 PM   #4
Registered: May 2003
Location: USA
Distribution: Fedora 21, RHEL 5,6&7, Windoze 7
Posts: 235

Rep: Reputation: 31
Give MySQL on Linux a try.
Much better and faster then Oracle.
good luck


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
kde, /tmp, /var/tmp and all that garba Linux - Software 4 06-17-2005 12:31 PM
/tmp files Risc91 AIX 4 01-18-2005 02:06 PM
Create file using 'touch ./tmp.$$', file tmp.3941 is created, why? huangyanfeng Linux - General 1 04-13-2004 03:36 AM
"/tmp/sv001.tmp/setup.bin" error while installing OO1.1.0 Choey Linux - Software 0 09-16-2003 04:52 PM
Newbie question - /tmp /var/tmp Mr happy Linux - Security 3 01-27-2003 01:03 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration