Re: FD_SETSIZE with large #s of files/ports in use

Поиск
Список
Период
Сортировка
Искать
От
Hiroshi Inoue
Тема
Re: FD_SETSIZE with large #s of files/ports in use
Дата
в 00:37:07
Msg-id
4BF35CC2.2010801@tpf.co.jp
Ответ на
Список
Дерево обсуждения
FD_SETSIZE with large #s of files/ports in use Barry Nicholson <b.nicholson@niceng.com>
Re: FD_SETSIZE with large #s of files/ports in use Hiroshi Inoue <inoue@tpf.co.jp>
Re: FD_SETSIZE with large #s of files/ports in use Hiroshi Inoue <inoue@tpf.co.jp>
Re: FD_SETSIZE with large #s of files/ports in use Tom Lane <tgl@sss.pgh.pa.us>
Re: FD_SETSIZE with large #s of files/ports in use Hiroshi Inoue <inoue@tpf.co.jp>
Re: FD_SETSIZE with large #s of files/ports in use Hiroshi Inoue <inoue@tpf.co.jp>
Re: FD_SETSIZE with large #s of files/ports in use "B. Nicholson" <b.nicholson@niceng.com>
Re: FD_SETSIZE with large #s of files/ports in use Tom Lane <tgl@sss.pgh.pa.us>
Re: FD_SETSIZE with large #s of files/ports in use Giles Lean <giles.lean@pobox.com>
Re: FD_SETSIZE with large #s of files/ports in use "B. Nicholson" <b.nicholson@niceng.com>
Hiroshi Inoue wrote:
> Hi,
> 
> Could you please try the attached patch?

Oops it doesn't seem to work.
Another way is to use poll() instead of select().

regards,
Hiroshi Inoue

> regards,
> Hiroshi Inoue
> 
> Barry Nicholson wrote:
>> An interesting issue came up the other day.  We are working with an 
>> application that opens a considerable number of files and tcp/udp 
>> ports (>3000).   Unfortunately, that means that the odbc driver fails 
>> sometimes due to a corrupted stack.  We eventually figured out what 
>> was causing the corrupted stack.
>> The SOCK_wait_for_ready(SocketClass *sock, BOOL output, int 
>> retry_count) function inside socket.c calls select.  Unfortunately, 
>> the socket file descriptor number can be quite large at this time.  
>> That means that the fd_set fds variable can misused.   The fd_set 
>> variable type only allows 1024 file descriptors to be used by the 
>> calling program on many Linux versions.   This can be changed by 
>> setting FD_SETSIZE or __FD_SETSIZE to a larger number.   We have ran 
>> tests where we were able to change the __FD_SETSIZE value in 
>> /usr/src/...linuxversion../linux/include/linux/posix_types.h.   The 
>> fix worked well.
>>
>> Unfortunately, this isn't a good solution because a software update to 
>> another linux version will invalidate our fix.   We've tried various 
>> mechanisms to set FD_SETSIZE or __FD_SETSIZE in socket.c but with no 
>> luck.   Has anyone else had this problem and came up with a good 
>> fix?   Or is there a better solution?
>>
>> Barry Nicholson
>> Niceng.com


В списке pgsql-odbc по дате отправления
От: Hiroshi Inoue
Дата:
От: Tom Lane
Дата:
FAQ