Question

General SQL error. Error reading data from the connection.

Asked by: hmstechsupport

Hello all.

We have a problem that we've been working on with a client for several months that we cannot resolve.  The environment is as follows.

Server (not sure of server details, but an  adequate box I'm told) is running Interbase 6.0.1.6 with 1 user and 1 database (ours) which is used to track timesheets.
On the same machine we have a Delphi 5 application running as a service which we call a 'Transaction Server' which is the layer that interacts with the Interbase database using the BDE (version 5.2) and the clients which are ActiveX controls running in IE.

The problem we see from our logs is that the connection from our 'Transaction Server' to the Interbase Server seems to fail during heavy periods of use with messages like "General SQL error.'#13#10'Error reading data from the connection."  or our own generated errors such as 'Unable to Process Request' which we display when we get an unexpected response from the database server.  During the week when there is less activity, things seem to go along without interuption and the service is not restarted, but on Friday or Monday when timesheets are due and the volume is up it's as if the IB Server cannot handle the requests fast enough.

We have taken their GDB file and run several tests here with it and it always behaves properly although we cannot really simulate the traffic this client has, but we have literally hundreds of other clients who have literally hundreds more users than this client does and the other clients do not display the same problems AT ALL.  Note that 'most' other clients are using either SQL Server as their back-end or Oracle with the same software and version, but we do have other Interbase database clients who do not encounter these issues.  

All that to say we think it's environmental but don't know where else to look.
We've checked and optimized the BDE, we've made sure we're all using the same version of the application, we've run their database and heavy processes here.  All without issue.

We've looked at the Interbase log, but it doesn't really tell us anything.

Are there better tools to examine the Interbase database?  

Does Interbase keep any better statistics about it's failures, or being overloaded or anything liek that that might help us?

Any suggestions are VERY welcome.


Thanks

HMSTechSupport

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2005-09-14 at 09:42:04ID21561378
Tags

error

,

sql

,

from

,

reading

,

data

Topic

Interbase / Firebird Database

Participating Experts
4
Points
500
Comments
25

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. DLL & other files needed for BDE
    What are the files needed for deploying BDE enabled applications ? I don't want to install database desktop etc....
  2. DELPHI-BDE
    how can i fix the error that BDE send me The error said this: Driver not know to system. BDE error 10013 [$27][$1D]
  3. BDE
    We are a manufacturing Company with 30 staff and a network of 15 machines running under NT4; we have managed all our IT needs so far ourselves. We have used Delphi to develop an integrated system from Enquiry to Despatch. It has been developed in Modules to aid Development a...
  4. Combination of BDE/Interbase won't accept UPPER in sql …
    Why is this? This is my query, resulting from a general function : select * from customer where (ID = 1) and (upper(enabled) = upper ('T')) This works with BDE/paradox, and with the interbase ISQL, but not with BDE/interbase. When using Delphi, the error message is : '...
  5. WHERE part in IB sql
    I am implementing row-level security. How? I have Owner_id field (VARCHAR) where I store comma-separated list of USER names like 'SYSDBA', 'JOHN', 'BHANZ' so when I am looking for records that user is supposed to see I do WHERE Owner_id LIKE USER. Reason to store QUOTED User...
  6. BDE and SQL server
    Hi, I have application written in Delphi and connects to SQL server (2000), via BDE and ODBC. When using TQuery or TStoredProcedure, prepare method, I think a new session to DB is opened cause I get exception about not being in transaction or deadlock because of the transacti...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: NickUpsonPosted on 2005-09-14 at 09:55:02ID: 14882430

what is the sweep interval set to? It could be the sweep is starting in the heavy load periods and it's that extra load that causes the failure.

The interbase log should say something in the relevant time period.

ib6 was known to have several bugs, can you upgrade to either ib7 (purchase from borland) or firebird (free download from www.ibphoenix.com)

 

by: hmstechsupportPosted on 2005-09-14 at 10:20:35ID: 14882701


The sweep interval on the database is set to 20,000 and the database has 6433 allocated pages, and a page size of 4096.

We use the free version of Interbase so we can bundle it with our software.  I have looked at Firebird, but we had issues with reserved words we use throughout our application so we made the choice to stick to IB 6.0.1.6 and not have to rewrite our application.

 

by: kacorPosted on 2005-09-14 at 11:37:20ID: 14883527

Which char set do you use?

 

by: kacorPosted on 2005-09-14 at 11:48:31ID: 14883642

Try to do an interbase back up and interbase restore.

 

by: hmstechsupportPosted on 2005-09-14 at 11:55:52ID: 14883694

The database dialect is set to 1.

I am currently reading a bunch of articles that seem to point to this being a network or NIC problem (URL below).  Have you seen this before?  The articles appear to be several years old, so I am not sure if they are accurate or not.

http://groups.google.ca/groups?q=%2B%22Error+reading+data+from+the+connection.%22+%2Binterbase&start=20&hl=en&

 

by: kacorPosted on 2005-09-14 at 12:17:49ID: 14883898

1. In which intervals do you make the restore? I suggest to make a backup/restore in/before the problematic periods This can help by complete sweeping (and cleaning) of the database.

2. I'll look at the articles you propose.

 

by: hmstechsupportPosted on 2005-09-14 at 12:32:20ID: 14884039

Thanks Kacor.  I appreciate the assistance.

I do not think though that the client has the skill (sorry to say that) to perform a sweep or a backup of the database.  Our bundling of the free version database was partly an effort to hide the complexities of a database from the client.  

Here are the highlights that I've come across.

------------------------------------------ Interbase log from client

OGCAL-MWTS01 (Client)      Mon Jul 18 07:13:04 2005
      INET/inet_error: send errno = 10054
 
OGCAL-MWTS01 (Client)      Mon Jul 18 07:13:04 2005
      INET/inet_error: send errno = 10054
 
OGCAL-MWTS01 (Client)      Mon Jul 18 07:13:04 2005
      REMOTE INTERFACE/gds__detach: Unsuccesful detach from database.  
      Uncommitted work may have been lost
 
OGCAL-MWTS01 (Client)      Mon Jul 18 07:13:04 2005
      INET/inet_error: send errno = 10054
 
OGCAL-MWTS01 (Client)      Mon Jul 18 07:13:04 2005
      INET/inet_error: send errno = 10054
 
OGCAL-MWTS01 (Client)      Mon Jul 18 07:13:04 2005
      REMOTE INTERFACE/gds__detach: Unsuccesful detach from database.  
      Uncommitted work may have been lost
 
OGCAL-MWTS01 (Client)      Mon Jul 18 07:13:04 2005
      INET/inet_error: send errno = 10054
----
---- From newsgroups
The interbase log is getting a few 10054 errors.  I cannot reproduce them.
the error code is ISC335544726 Error Reading data from the connection:

Does anybody know what could be causing this?


 Jeff Overcash (TeamB)   Oct 23 2001, 9:17 am     show options

Newsgroups: mers.interbase.list
From: "Jeff Overcash (TeamB)" <overc...@onramp.net> - Find messages by this author  
Date: Mon, 22 Oct 2001 22:25:23 -0400
Local: Mon, Oct 22 2001 10:25 pm  
Subject: Re: 10054 errors in interbase log
Reply to Author | Forward | Print | Individual Message | Show original | Report Abuse  

10054 tend to be a physical problem with the network.  Usually a bad NIC.
----
> server using BDE (in 1-5 threads).
> From time to time "Error reading data from the connection" occurs.
> I don't know why.

My first guess would be one of the following:
1) Network problem
2) Threading problem
In general, when multithreading using IB you must have a separate
connection to the DB for each thread, and the connection must be
"remote" (use "localhost" as the host name if the server is running on
the same machine as the client -- using "localhost" is considered a
"remote" connection).
The BDE in particular seems to have problems with multithreading on IB,
especially if three or more threads access the server concurrently. The
BDE requires a separate TSession for each thread, but even when this is
done you sometimes see problems. The IBX components do not have this
problem.
----
---- More
This usually means one of two things:
o Your network is having serious problems
o The IB server has crashed.
You can figure out which one is the problem by looking at interbase.log
on the server. If you see messages about IBGuardian restarting the
server, then the server has crashed. If you don't see any messages at
the time you saw this message, then you're having network problems.
If the server is crashing on a simple SELECT, then your DB is probably
corrupt. You should do a database validation in IBConsole and then
figure out what made your DB corrupt in the first place. In particular,
make sure you have IB 6.0.1.6 and that Forced Writes are ON.
----

All connections lost at once with error 10054 - by Borland Developer Support Staff

Rating: \l "rating" \l "rating"Ratings: 6 Rate it
Abstract: Some sort of network error occured
Problem:
All connections lost at once with error 10054 in interbase.log.  It can
happen with both Service pack 2 & 3 for NT 4.0.  InterBase Server is
still running on the server.  


Solution:
Error 10054 is a winsock error for connection reset.  You can find the
list of winsock errors in the winsock.h file.

Since the InterBase Server is up and running at the time of the problem,
it's an indication that it's not an InterBase issue but rather a network
issue.  Check the following:

 *  At the time of the problem, what's the traffic load?  Check for
    traffic loads that can flood the network. Is there anything scheduled
    to flood the network at certain time?

 *  Check for network hardware problems such as bad switch, router,
     hub, etc.

*   Another possible scenario involves having more than one protocol
    bound to the same network card. In one case a customer had TCP/IP,
    IPX/SPX, and RIP for IPX bound to the same ethernet card. When he
    unbound IPX/SPX and RIP for IPX from the card, the errors disappeared.

----
You must connect as "remote" (use localhost as the host name if
the IB server and client are running on the same machine) and you must
not attempt to concurrently access the same connection to IB from two
different threads, except in the case of asynchronous query cancellation
----

 

by: kacorPosted on 2005-09-14 at 13:22:16ID: 14884506

this was a great job! my congratulation. unfortunately I have no ideas :-))

wbr
Janos

 

by: hmstechsupportPosted on 2005-09-14 at 13:42:06ID: 14884688

Thanks Kacor.

I appreciate the time you took to examine the case for me.   I have convinced the client to change the network card about 10 minutes ago, so now we watch and see.

Do you know of better logs than the interbase.log or a tool to get better logs from Interbase?

Are there ways to tweak the server to use more RAM, or less RAM or any configuration capabilities within the Server part of Interbase?


Thanks

 

by: kacorPosted on 2005-09-14 at 14:05:30ID: 14884927

As I know using IB6 you can't control the RAM area but I try to search something about

 

by: kacorPosted on 2005-09-14 at 14:15:44ID: 14885015

From the IB6 Operation Manual

Sizing memory
It is important to equip your server with a sufficient amount of physical memory to
ensure good performance.
While InterBase can function in a low-profile hardware configuration, with as little as
32MB of RAM on most operating systems, it is recommended to have at least 64MB of
RAM on a server system. Database servers that experience a high load can benefit from
more RAM.
The base RAM requirement of the ibserver executable and for each connected user is low:
approximately 1500KB, plus 28KB for each client connection. ibserver caches metadata
and data for each database to which it connects. User operations such as sorting
temporarily consume additional memory. A heavily loaded server with dozens of clients
performing concurrent queries requires up to 256MB of RAM.
On Windows NT, you can use the Task Manager, Performance Monitor, and other tools
to monitor the resource use of ibserver. UNIX and Linux servers have similar resource
consumption reporting tools. Add RAM to a system that shows too many page faults.

 

by: kacorPosted on 2005-09-14 at 14:19:29ID: 14885049

From the IB6 Operation Manual

Network cables develop flaws surprisingly frequently. The result can be sporadic lost
packets, for which operating systems compensate by automatically resending packets.
This translates into mysterious network performance degradation. You should test
network cables regularly. Replacing flawed cables is a low-cost way to keep your
network running at peak efficiency.

 

by: DoruIlasiPosted on 2005-10-30 at 02:22:43ID: 15187592

In addition to "Comment from hmstechsupport Date: 09/14/2005 10:32PM EEST" we indentifyed another cause of this type of gds_db broker crash - an overflow caused by external function library. Are you using some UDF's ? If yes, please take a look of them and see if they corectly free the memory on exit. If not, UDF's must be re-written or at lest recompiled with correct compiler options. The problem has the same "appearance" on Firebird/Interbase on Windows ,Linux and FreeBSD.  

 

by: hmstechsupportPosted on 2005-11-01 at 06:26:48ID: 15200142

Thanks I appreciate the input, but we are not using any UDF's, TRIGGERS, or Stored Procedures on the database itself.  All business logic is within the application as we support many databases.

Thanks

 

by: BAlexandrovPosted on 2005-11-10 at 06:14:58ID: 15265340

hi,
I am sure that this is network problem - we have encountered similar ones with 10054 errors and various network errors. The problem was in bad network cables - some packets were lost and this causes connection to be dropped.
The problem is that you say they are in same machine - database client and server, so I cannot imagine how this can happen.
If you use connection by IP address it still goes thru IP stack and there can be some failures in network drivers...try update draivers also (you said that NIC is changed).
Why not try using local connection - directly path to database in bde configuration... (BDE is not supported, also IB 6 and there are recommendations how to recover from such errors but rewriting of application is not a case)

 

by: hmstechsupportPosted on 2005-11-10 at 07:31:09ID: 15266044

Thanks BAlexander.
What do you by a direct path in the BDE.  We are using something similiar to SERVERNAME:C:\path\file.gdb as I think is recommended.

Is there a better way?

 

by: BAlexandrovPosted on 2005-11-10 at 08:17:51ID: 15266477

Yes this is recomended but you can try with "local connection" that is different type to connect to database - thru directly accessing file. This way you can have only one user connection but you bypass the network layer.

 

by: hmstechsupportPosted on 2005-11-10 at 08:24:59ID: 15266569

How does that get configured then in the BDE?

 

by: BAlexandrovPosted on 2005-11-10 at 09:19:00ID: 15267183

Instead of SERVERNAME:C:\path\file.gdb just C:\path\file.gdb

Sory but I do not remember exactly - almost 2 years till I have'nt worked with IB :)

 

by: hmstechsupportPosted on 2005-11-10 at 10:04:51ID: 15267643

Ok.  Thanks.  We'll give it a try here first.

 

by: BAlexandrovPosted on 2005-12-05 at 08:28:25ID: 15420532

What happened?

 

by: hmstechsupportPosted on 2005-12-05 at 09:38:52ID: 15421193

Could not get it to work locally.  When I try to change the BDE setting from "SERVERNAME:C:\path\file.gdb" to just "C:\path\file.gdb", I get an unknown user name or password error from the BDE.  I think it is because Interbase is installed as a remote and not a local server (I am guessing).

We're still working with the client (long distance) to try to help, but so far have been unsuccessful.

 

by: hmstechsupportPosted on 2006-02-17 at 07:29:06ID: 15981440

Hello all.  

No. This case was never solved, and the client is still not happy with us.  On occasion we perform the task that they cannot do for them and send them back an updated Interbase database.  Not a real solution but a workaround.

Thanks for all of your assistances.  We will close this case.

 

by: hmstechsupportPosted on 2006-02-17 at 07:32:43ID: 15981472

Hello all.

Thank you for your persistance and answers.  I have split closed the case and split the points as fairly as I saw fit.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...