# Phantom event for closed and removed socket

**URL:** <https://www.ruby-forum.com/t/phantom-event-for-closed-and-removed-socket/121585>\
**Category:** NGINX\
**Created:** [November 29, 2007, 3:13am UTC](https://www.ruby-forum.com/t/phantom-event-for-closed-and-removed-socket/121585 "2007-11-29T03:13:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Deason](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/85e7bf/32.png) [@Andrew\_Deason](https://www.ruby-forum.com/u/Andrew_Deason)\
**Post date:** [November 29, 2007, 3:13am UTC](https://www.ruby-forum.com/t/phantom-event-for-closed-and-removed-socket/121585/1 "2007-11-29T03:13:28Z")

</div>

I’m running nginx 0.5.32 on a box running Solaris 10u3 as a  
load-balancing reverse proxy. We’re seeing a lot of these messages in  
nginx-error.log:

2007/11/28 19:37:15 [alert] 27779#0: phantom event 0001 for closed and  
removed socket 106  
2007/11/28 19:37:16 [alert] 27779#0: phantom event 0001 for closed and  
removed socket 141  
2007/11/28 19:37:16 [alert] 27779#0: phantom event 0004 for closed and  
removed socket 81  
2007/11/28 19:37:16 [alert] 27779#0: phantom event 0001 for closed and  
removed socket 112

There’s usually a lot of them like that in a row, but they are short  
bursts, with a longer time between bursts (between a few minutes or an  
hour). What does this mean? Is it a real problem, and what can I do to  
fix it? We’re not experiencing any serious problems; occaisionally the  
server will not respond to a request, but that may be an unrelated  
networking issue we’re looking at.

I found this: [Lexa Software: Nginx-ru@sysoev.ru archive](http://www.lexa.ru/nginx-ru/msg12678.html) , but I cannot  
read Russian, and I don’t trust myself to guess at what that means.  
Since it was provided there, so I need to provide debug info for this?

I tried switching to the eventport module when I saw that this message  
is generated by the /dev/poll module, but that had problems with  
requests originating from the same host as the server, so that’s not an  
option for us.

---

<div class="post-metadata">

**Author:** ![Andrew\_Deason](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/85e7bf/32.png) [@Andrew\_Deason](https://www.ruby-forum.com/u/Andrew_Deason)\
**Post date:** [November 29, 2007, 8:34am UTC](https://www.ruby-forum.com/t/phantom-event-for-closed-and-removed-socket/121585/2 "2007-11-29T08:34:20Z")

</div>

On Wed, Nov 28, 2007 at 08:04:13PM -0600, Andrew Deason wrote:

> 2007/11/28 19:37:16 [alert] 27779#0: phantom event 0001 for closed and  
> read Russian, and I don’t trust myself to guess at what that means.  
> Since it was provided there, so I need to provide debug info for this?
> 
> I tried switching to the eventport module when I saw that this message  
> is generated by the /dev/poll module, but that had problems with  
> requests originating from the same host as the server, so that’s not an  
> option for us.

This is inconsistency in nginx /dev/poll processing.  
/dev/poll returns several events for one iteration, and while processing  
one of events nginx closes socket of another event: for example, a  
client  
has closed connection so nginx closes proxy/fastcgi connection for this  
request and so. In general, nginx should silently discards these events  
and I will probably do so.

To ensure that this is nginx processing effects you may try to set

events {  
devpoll\_events 1;  
}

and /dev/poll will return the single event per iteration.  
I do not think that will decrease perfomance noticeably.
