Re: big problem when I use dbopen

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
2010/9/2 Difei Qi <[email protected]>:
> hello, I encounter a big problem when I use freeTDS.
> My program must receive thousands of connections from different users. When
> I have open these handles, if I use "dbopen()"  of freeTDS,the problem will
> core dump at once.
>
> You can simply test the situation in this way:
> first turn on the ulimit -n on Linux to append open files to a high num,
> saying, 10240;
> and then open more then 1900 handles of one file and do not close them,and
> then try to "dbopen()", the problem will immediately core dump.
>
> FILE *fp[2000]
> for(int i=0;i<1900;i++)
> (
>    fp[i]=fopen("noclosefile","r");
>    //don't close them;
> )
> .....
>
> dbopen();
>
> then the problem will core dump!
> thanks for you help!

fixed on post versions. Core is due to FD_SET called with file handle
>= FD_SETSIZE. Now we use poll function when available or we check
file handle value instead of core.

freddy77
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.