Skip to Content.
Sympa Menu

freetds - Re: [freetds] Memory problems with dbcmd

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Memory problems with dbcmd
  • Date: Tue, 4 Dec 2012 19:30:58 +0000

2012/12/4 Alberto Pulvirenti <alberto.pulvirenti AT crowdengineering.com>:
> Dear all,
>
> unfortunately, searching on google seemed to be unsuccessful for this, and
> I didn't find any help looking ad previous discussions (maybe since I
> subscribed this mailing list).
>
> I have manage to set up a connection to a MS SQL database server using
> freeTDS, but it sometimes (seldom, fortunately) happens that a dbcmd fails.
> Looking at the various documentations, it should be a problem of memory
> allocation, but this happened even for extremely simple queries like a
> "begin transaction", and not always for the same query: it just happened in
> a given moment, and it was not either possible to reproduce this problem,
> but I remained afraid that it can appear again.
> I don't really understand how can dbcmd fail with such a simple query when
> the machine is not stuck (which I would think if it is a problem is so
> serious that even such a small string cannot be allocated).
>
> The MS SQL server stays in another machine to which I must connect through
> network, although it is a machine internal to the location where all this
> stuff runs. Can it happen that a sudden and momentary communication failure
> causes dbcmd() to fail? Or its failure are only due to memory allocation
> problems?
>
> Is there any way I can adopt to deeper check this problem?
>
> Thanks
>
> Alberto

Personally I would exclude a memory problem. If the system fails to
allocate few bytes of memory you should note other problems (unless
you set some limits on your program for instance using PHP module
which limit memory itself).

It's possible that connection got broken for some reason (a simple
service restart or a backup schedule which put database in some
particular state). Or even that server disconnect you cause you where
idle for too time (see recent keepalive discussion).

Frediano




Archive powered by MHonArc 2.6.24.

Top of Page