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 <[email protected]>, 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 > [email protected] > http://observer.wunderwood.org/ (my blog) > > > > On Mar 4, 2017, at 2:32 AM, Mikhail Khludnev <[email protected]> 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" <[email protected] > > написал: > > > > > 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 <[email protected]>, 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" < > > > [email protected] > > > > написал: > > > > > > > > > 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. > > > > > > > > >
