-1

I am getting file leaks when I run my code on Google Compute Engine to what appears to be Google servers:

php        3630         www-data  873u     IPv4              34632       0t0        TCP xxxx.internal:43328->vu-in-f139.1e100.net:https (CLOSE_WAIT)
php        3630         www-data  874u     IPv4              34640       0t0        TCP xxxx.internal:39500->vh-in-f139.1e100.net:https (CLOSE_WAIT)
php        3630         www-data  875u     IPv4              34648       0t0        TCP xxxx:43336->vu-in-f139.1e100.net:https (CLOSE_WAIT)

I am not making calls to those servers directly. I believe Google's API Library may be making those calls, but it doesn't appear to be closing it. I have run this same code on a baremetal server and I don't get these file leaks.

Does anyone have any idea what is causing this?

HBruijn
  • 77,029
  • 24
  • 135
  • 201
T. Price
  • 1
  • 1

1 Answers1

2

Close-waits are the result of TCP sessions being closed on the remote side, but the socket locally hasn't closed. The OS will keep tracking the connection until the OS's tcp socket time limit or you "close" it. This usually is caused by not cleaning up after your connections. (i.e. when you are done with a socket, you don't close it or destroy the object properly) It is possible that you're not cleaning up the google's API objects when you're done with them. Without more details (code?) we really can only guess.

TheCompWiz
  • 7,409
  • 17
  • 23