473,503 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with mysql api calls.

jwl
I'm having a problem with a bit of code that I have "adopted". It was
partially complete when I took it over. The function of the code is to
read a log file, locate files described in that log file and fill in a
few tables in a couple of MySql databases. The program is using a
number of std objects, hashmaps, linklists, vectors etc. It makes
direct calls to the MySql api. The version of MySql is 3.23.58.
Redhat 9, g++ (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) on a Intel
IA32 system.

The problem is that after some number of transactions, the call to
connect to the server fails with the error:
Can't create TCP/IP socket (24)

I did a Google search for that error message and nothing came up that
seemed to fit.

I was able to aggrevate the situation by adding a heartbeat update that
simply put the current date in a table periodically. If I set the
interval short, to one minute, it would fail in a couple of hours. If I
bumped it up to 10 minutes, it took 2.5 days to fail. So I moved that
code to a completely separate process, via a fork call. It didn't
improve anything.

I have integrated the Electric Fence library into the program and set
all the various options to try to catch malloc problems. I found one,
but fixing it didn't have any effect on the failure.

I'm not looking for a solution but ideas on where to go next to isolate
the failure. I belive the failure is a symptom of the problem and not
the problem itself. During previous attempts to find the problem I
found the open of the log file would fail after a number of successful
attempts. And it is the total number of transactions that seems to
give me the trouble, but it doesn't really care which of the two
databases that I'm accessing/updating, it's just the total number. In
fact the heartbeat update is being done to one and the failure is on the
other one.

Any suggestions as to what I might do? Any ideas on tools that might
tell me what's up? I forgot to mention this is a muli-threaded app. 7
threads running, mostly in a sleep state. CPU load is very low. All
the threads are started at the beginning and are not recreated.
Changing the code to open DB once and update many times, vs open
everytime we update had no effect.

Thanks for any assistance.

Jim.

Jul 22 '05 #1
0 1209

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2162
by: Stephen Harris | last post by:
I downloaded: Windows Binaries PHP 5.0.4 zip package - 31 Mar 2005 md5: fff10991a8e6f3b36ee567eb236ae3f4 This is the current BETA release of version 5.0 of the MySQL database server....
0
2202
by: dohnut | last post by:
Here's one for some bored problem solver :) I ran across this earlier today and fixed it, but don't exactly know why. (that usually only happens in C :) I'm using Perl version 5.8.0 btw. ...
0
1238
by: Jeff O | last post by:
I am able to ping both directions from a Linux box to a WinXP box, but when I try to connect to MySql running on the Linux box using SQuirreL (a java-based isql tool) using Connector/J 2.0.14 I'm...
1
2765
by: James | last post by:
Hey everyone, I have a really obscure but impassable problem with a reasonably simple piece of php/PEAR DB/MySQL code When calling several stored procs the first call succeeds, but subsequent...
11
2131
by: # Cyrille37 # | last post by:
Hello all, I come to you to getting help for managing multi threading and database connection. My project use Xml-Rpc to receive messages, so each call come from a different thread. Incoming...
3
1747
by: rbutlerjr | last post by:
I've run into a strange problem with mysql_field_len returning -1 on any / all calls to it. This is on an Unbuntu Dapper system, with PHP 4.4.2, MySQL 4.1.15, and the PHP/MySQL Client API is...
0
1028
by: ppuniversal | last post by:
hello, I am making an application where I have to copy the values of some of the tuples(which are not already copied into the files) from my database in MySQL into two files.Now I have an attribute...
9
2767
by: christopher_board | last post by:
Hi all. I am trying to write a php page which connects to a MySQL Database which is supposed to get the results from a table within a database and display the results in a table. Below is the...
0
850
by: Angus | last post by:
I'm confused by manual's tutorial for threading. I don't believe I need any of the thread-safe measures, because while the worker thread is running, the main thread doesn't make any MySQL calls. So...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7076
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5576
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5005
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4670
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.