You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Yago Riveiro <ya...@gmail.com> on 2017/03/04 00:33:38 UTC

Solr 6.3.0, possible SYN flooding on port 8983. Sending cookies.

Hello, 

I have this log in my dmesg: possible SYN flooding on port 8983. Sending
cookies.

The Solr instance (6.3.0) has not accepting more http connections.

I ran this: _lsof -nPi |grep \:8983 | wc -l_ and the number of connection to
port 8983 is about 14K in CLOSE_WAIT ou ESTABLISHED state.

Any suggestion of what could be the reason?

Thanks,

/Yago




-----
Best regards

/Yago
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-6-3-0-possible-SYN-flooding-on-port-8983-Sending-cookies-tp4323341.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr 6.3.0, possible SYN flooding on port 8983. Sending cookies.

Posted by Yago Riveiro <ya...@gmail.com>.
The weird thing is that the lsof command shows that connections are made between 2 solr instances and not from the origin of new income data ...

--

/Yago Riveiro

On 4 Mar 2017 10:32 +0000, Mikhail Khludnev <mk...@apache.org>, wrote:
> I hardly can comment regarding PHP. But if you call curl as an external
> program it.s a dead end. However, giving
> http://stackoverflow.com/questions/972925/persistent-keepalive-http-with-the-php-curl-library
> you can reuse a 'context' across curl library calls and make sure that's
> keep-alive pool is large enough for your app (which btw, rarely true for
> java.net.URL, where it's just 5 connections). Happy pooling!
>
> 04 марта 2017 г. 12:25 пользователь "Yago Riveiro" <yago.riveiro@gmail.com
> написал:
>
> > Hi Mikhail,
> >
> > I’m not using SSL, and the way I call Solr is through a php script that
> > use Curl
> >
> > --
> >
> > /Yago Riveiro
> >
> > On 4 Mar 2017 08:54 +0000, Mikhail Khludnev <gg...@gmail.com>, wrote:
> > > Hello, Yago.
> > > It usually happens when client doesn't reuse http connections. How do you
> > > call Solr? Is there SSL?
> > >
> > > 04 марта 2017 г. 3:33 пользователь "Yago Riveiro" <
> > yago.riveiro@gmail.com
> > > написал:
> > >
> > > > Hello,
> > > >
> > > > I have this log in my dmesg: possible SYN flooding on port 8983.
> > Sending
> > > > cookies.
> > > >
> > > > The Solr instance (6.3.0) has not accepting more http connections.
> > > >
> > > > I ran this: _lsof -nPi |grep \:8983 | wc -l_ and the number of
> > connection
> > > > to
> > > > port 8983 is about 14K in CLOSE_WAIT ou ESTABLISHED state.
> > > >
> > > > Any suggestion of what could be the reason?
> > > >
> > > > Thanks,
> > > >
> > > > /Yago
> > > >
> > > >
> > > >
> > > >
> > > > -----
> > > > Best regards
> > > >
> > > > /Yago
> > > > --
> > > > View this message in context: http://lucene.472066.n3.
> > > > nabble.com/Solr-6-3-0-possible-SYN-flooding-on-port-
> > 8983-Sending-cookies-
> > > > tp4323341.html
> > > > Sent from the Solr - User mailing list archive at Nabble.com.
> > > >
> >

Re: Solr 6.3.0, possible SYN flooding on port 8983. Sending cookies.

Posted by Yago Riveiro <ya...@gmail.com>.
I’m using guzzle 3 for HTTP (it’s old but it’s the only one that works in 5.3) and the documentation says that use persistent connection (but you know … is PHP, weird things happen).

Maybe I need to dump data to disk an use Java to post it ...

--

/Yago Riveiro

On 4 Mar 2017 16:50 +0000, Walter Underwood <wu...@wunderwood.org>, wrote:
> PHP uses the curl library for HTTP. It is a bit of a mess. It opens a new connection for every request.
>
> I would not try to pool client connections with PHP. PHP starts over with a new environment for each page, so that will be very hard to manage.
>
> I would suggest running haproxy or something similar on the same host as PHP. Connect to it locally, and let it pool connections to Solr. That will use Unix-local connections that don’t actually run TCP.
>
> Really, don’t try to fix networking inside PHP.
>
> wunder
> Walter Underwood
> wunder@wunderwood.org
> http://observer.wunderwood.org/ (my blog)
>
>
> > On Mar 4, 2017, at 2:32 AM, Mikhail Khludnev <mk...@apache.org> wrote:
> >
> > I hardly can comment regarding PHP. But if you call curl as an external
> > program it.s a dead end. However, giving
> > http://stackoverflow.com/questions/972925/persistent-keepalive-http-with-the-php-curl-library
> > you can reuse a 'context' across curl library calls and make sure that's
> > keep-alive pool is large enough for your app (which btw, rarely true for
> > java.net.URL, where it's just 5 connections). Happy pooling!
> >
> > 04 марта 2017 г. 12:25 пользователь "Yago Riveiro" <yago.riveiro@gmail.com
> > написал:
> >
> > > Hi Mikhail,
> > >
> > > I’m not using SSL, and the way I call Solr is through a php script that
> > > use Curl
> > >
> > > --
> > >
> > > /Yago Riveiro
> > >
> > > On 4 Mar 2017 08:54 +0000, Mikhail Khludnev <gg...@gmail.com>, wrote:
> > > > Hello, Yago.
> > > > It usually happens when client doesn't reuse http connections. How do you
> > > > call Solr? Is there SSL?
> > > >
> > > > 04 марта 2017 г. 3:33 пользователь "Yago Riveiro" <
> > > yago.riveiro@gmail.com
> > > > написал:
> > > >
> > > > > Hello,
> > > > >
> > > > > I have this log in my dmesg: possible SYN flooding on port 8983.
> > > Sending
> > > > > cookies.
> > > > >
> > > > > The Solr instance (6.3.0) has not accepting more http connections.
> > > > >
> > > > > I ran this: _lsof -nPi |grep \:8983 | wc -l_ and the number of
> > > connection
> > > > > to
> > > > > port 8983 is about 14K in CLOSE_WAIT ou ESTABLISHED state.
> > > > >
> > > > > Any suggestion of what could be the reason?
> > > > >
> > > > > Thanks,
> > > > >
> > > > > /Yago
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > -----
> > > > > Best regards
> > > > >
> > > > > /Yago
> > > > > --
> > > > > View this message in context: http://lucene.472066.n3.
> > > > > nabble.com/Solr-6-3-0-possible-SYN-flooding-on-port-
> > > 8983-Sending-cookies-
> > > > > tp4323341.html
> > > > > Sent from the Solr - User mailing list archive at Nabble.com.
> > > > >
> > >
>

Re: Solr 6.3.0, possible SYN flooding on port 8983. Sending cookies.

Posted by Walter Underwood <wu...@wunderwood.org>.
PHP uses the curl library for HTTP. It is a bit of a mess. It opens a new connection for every request.

I would not try to pool client connections with PHP. PHP starts over with a new environment for each page, so that will be very hard to manage.

I would suggest running haproxy or something similar on the same host as PHP. Connect to it locally, and let it pool connections to Solr. That will use Unix-local connections that don’t actually run TCP.

Really, don’t try to fix networking inside PHP. 

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)


> On Mar 4, 2017, at 2:32 AM, Mikhail Khludnev <mk...@apache.org> wrote:
> 
> I hardly can comment regarding PHP. But if you call curl as an external
> program it.s a dead end. However, giving
> http://stackoverflow.com/questions/972925/persistent-keepalive-http-with-the-php-curl-library
> you can reuse a 'context' across curl library calls and make sure that's
> keep-alive pool is large enough for your app (which btw, rarely true for
> java.net.URL, where it's just 5 connections). Happy pooling!
> 
> 04 марта 2017 г. 12:25 пользователь "Yago Riveiro" <ya...@gmail.com>
> написал:
> 
>> Hi Mikhail,
>> 
>> I’m not using SSL, and the way I call Solr is through a php script that
>> use Curl
>> 
>> --
>> 
>> /Yago Riveiro
>> 
>> On 4 Mar 2017 08:54 +0000, Mikhail Khludnev <gg...@gmail.com>, wrote:
>>> Hello, Yago.
>>> It usually happens when client doesn't reuse http connections. How do you
>>> call Solr? Is there SSL?
>>> 
>>> 04 марта 2017 г. 3:33 пользователь "Yago Riveiro" <
>> yago.riveiro@gmail.com
>>> написал:
>>> 
>>>> Hello,
>>>> 
>>>> I have this log in my dmesg: possible SYN flooding on port 8983.
>> Sending
>>>> cookies.
>>>> 
>>>> The Solr instance (6.3.0) has not accepting more http connections.
>>>> 
>>>> I ran this: _lsof -nPi |grep \:8983 | wc -l_ and the number of
>> connection
>>>> to
>>>> port 8983 is about 14K in CLOSE_WAIT ou ESTABLISHED state.
>>>> 
>>>> Any suggestion of what could be the reason?
>>>> 
>>>> Thanks,
>>>> 
>>>> /Yago
>>>> 
>>>> 
>>>> 
>>>> 
>>>> -----
>>>> Best regards
>>>> 
>>>> /Yago
>>>> --
>>>> View this message in context: http://lucene.472066.n3.
>>>> nabble.com/Solr-6-3-0-possible-SYN-flooding-on-port-
>> 8983-Sending-cookies-
>>>> tp4323341.html
>>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>> 
>> 


Re: Solr 6.3.0, possible SYN flooding on port 8983. Sending cookies.

Posted by Mikhail Khludnev <mk...@apache.org>.
I hardly can comment regarding PHP. But if you call curl as an external
program it.s a dead end. However, giving
http://stackoverflow.com/questions/972925/persistent-keepalive-http-with-the-php-curl-library
you can reuse a 'context' across curl library calls and make sure that's
keep-alive pool is large enough for your app (which btw, rarely true for
java.net.URL, where it's just 5 connections). Happy pooling!

04 марта 2017 г. 12:25 пользователь "Yago Riveiro" <ya...@gmail.com>
написал:

> Hi Mikhail,
>
> I’m not using SSL, and the way I call Solr is through a php script that
> use Curl
>
> --
>
> /Yago Riveiro
>
> On 4 Mar 2017 08:54 +0000, Mikhail Khludnev <gg...@gmail.com>, wrote:
> > Hello, Yago.
> > It usually happens when client doesn't reuse http connections. How do you
> > call Solr? Is there SSL?
> >
> > 04 марта 2017 г. 3:33 пользователь "Yago Riveiro" <
> yago.riveiro@gmail.com
> > написал:
> >
> > > Hello,
> > >
> > > I have this log in my dmesg: possible SYN flooding on port 8983.
> Sending
> > > cookies.
> > >
> > > The Solr instance (6.3.0) has not accepting more http connections.
> > >
> > > I ran this: _lsof -nPi |grep \:8983 | wc -l_ and the number of
> connection
> > > to
> > > port 8983 is about 14K in CLOSE_WAIT ou ESTABLISHED state.
> > >
> > > Any suggestion of what could be the reason?
> > >
> > > Thanks,
> > >
> > > /Yago
> > >
> > >
> > >
> > >
> > > -----
> > > Best regards
> > >
> > > /Yago
> > > --
> > > View this message in context: http://lucene.472066.n3.
> > > nabble.com/Solr-6-3-0-possible-SYN-flooding-on-port-
> 8983-Sending-cookies-
> > > tp4323341.html
> > > Sent from the Solr - User mailing list archive at Nabble.com.
> > >
>

Re: Solr 6.3.0, possible SYN flooding on port 8983. Sending cookies.

Posted by Yago Riveiro <ya...@gmail.com>.
Hi Mikhail,

I’m not using SSL, and the way I call Solr is through a php script that use Curl

--

/Yago Riveiro

On 4 Mar 2017 08:54 +0000, Mikhail Khludnev <gg...@gmail.com>, wrote:
> Hello, Yago.
> It usually happens when client doesn't reuse http connections. How do you
> call Solr? Is there SSL?
>
> 04 марта 2017 г. 3:33 пользователь "Yago Riveiro" <yago.riveiro@gmail.com
> написал:
>
> > Hello,
> >
> > I have this log in my dmesg: possible SYN flooding on port 8983. Sending
> > cookies.
> >
> > The Solr instance (6.3.0) has not accepting more http connections.
> >
> > I ran this: _lsof -nPi |grep \:8983 | wc -l_ and the number of connection
> > to
> > port 8983 is about 14K in CLOSE_WAIT ou ESTABLISHED state.
> >
> > Any suggestion of what could be the reason?
> >
> > Thanks,
> >
> > /Yago
> >
> >
> >
> >
> > -----
> > Best regards
> >
> > /Yago
> > --
> > View this message in context: http://lucene.472066.n3.
> > nabble.com/Solr-6-3-0-possible-SYN-flooding-on-port-8983-Sending-cookies-
> > tp4323341.html
> > Sent from the Solr - User mailing list archive at Nabble.com.
> >

Re: Solr 6.3.0, possible SYN flooding on port 8983. Sending cookies.

Posted by Mikhail Khludnev <gg...@gmail.com>.
Hello, Yago.
It usually happens when client doesn't reuse http connections. How do you
call Solr? Is there SSL?

04 марта 2017 г. 3:33 пользователь "Yago Riveiro" <ya...@gmail.com>
написал:

> Hello,
>
> I have this log in my dmesg: possible SYN flooding on port 8983. Sending
> cookies.
>
> The Solr instance (6.3.0) has not accepting more http connections.
>
> I ran this: _lsof -nPi |grep \:8983 | wc -l_ and the number of connection
> to
> port 8983 is about 14K in CLOSE_WAIT ou ESTABLISHED state.
>
> Any suggestion of what could be the reason?
>
> Thanks,
>
> /Yago
>
>
>
>
> -----
> Best regards
>
> /Yago
> --
> View this message in context: http://lucene.472066.n3.
> nabble.com/Solr-6-3-0-possible-SYN-flooding-on-port-8983-Sending-cookies-
> tp4323341.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>