473,654 Members | 2,974 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 1224

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

Similar topics

2
2170
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. apache_2.0.54-win32-x86-no_ssl.exe 16-Apr-2005 15:13 7.8M Installer Pack
0
2208
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. Ok, let's start here: I end up with an array that comes from a fetchrow_array() call to MySQL. I return the array to a function.
0
1249
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 getting the following exception: java.sql.SQLException: Cannot connect to MySQL server on 10.12.12.13:3306. Is there a MySQL server running on the machine/port you are trying to connect to? (java.net.ConnectException) at...
1
2771
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 calls fail no matter which SP is called first it always works, and the rest fail... with: >>>
11
2146
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 calls are executing SQL on a MysqlConnection. MysqlConnection does not like when concurents calls appends. For a fast and dirty solution, I've put a Monitor() at messages arrived.
3
1757
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 5.0.18. This is using the default dpkg installs of php4-mysql and mysql-server-4.1 This same call and associated code works properly on existing Windows and Linux systems (both with older versions of PHP & MySQL). The primary difference that I can see...
0
1034
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 with name "Replication_Done". This is an integer type of attribute and its initial value is 0, meaning that this tuple has not been copied into any of the 2 files. Now whenever a tuple is copied into one of the file, the value of this...
9
2777
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 code that I am using: <?php function connectDatabase() { $dbhost = 'localhost'; $dbuser = 'root';
0
868
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 the only issue I should be facing is getting the connection to work in a different thread, and not worry about synchronization. This is the code I have for my worker thread: verify(mysql_library_init(-1, NULL, NULL) == 0); verify(mysql_thread_init()...
0
8375
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8290
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8815
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8707
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6161
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1593
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.