The following command will show you all open files, including the TCP related ones, of all processes running on your system.
You should be able to easily locate the culprit from its output.
And by the way, please don't gratuitously run "kill -9", that's a poor practice.
Hi Experts,
need help about release or refresh TCP Connection:
i have the sample like below :
application log connection:
0500 ( 192.168.0.1:36053) 00919 2007/05/10 23:30:25 112 13 2007/05/10 23:30:25 1969/12/31 17:00:00
0500 ( 192.168.0.1:36054) 00920 2007/05/10 23:30:26 000 00... (3 Replies)
I wrote a very simple script to calculate the DB connection from an appserver and check the total netstat connection to a particular DB exceed 25 then it will send mail
netstat -a 2> /dev/null | awk '/.*ESTAB/{print $5}' | cut -d. -f1 | uniq -c | awk '{if ($1 > 25)print $2," exceed ",$1;}'
... (1 Reply)
Hi - I frequently run commands, and transfer files to/from a host that uses SecurID ssh authentication. It is a real pain to have to enter the authentication information every time I want to interact with this host. I am wondering if there is a way to establish a one-time ssh connection to this... (2 Replies)
Dear experts,
I am seeing a lot of TCP failed connection attempts from "netstat -s" on one of our servers.
How can I pin point what connection failed and what are the ports involved?
Any tools/commands I can dig in deeper to diag. what went wrong on these "failed connection attempts"?
... (2 Replies)
HI
I know that it sounds crazy :eek:
appreciated if any one provided me a solution for my below case , the below script is checking the Database availability on many servers by establishing rsh session ( one by one ) , sometime one of the servers goes down and while this the script taking... (0 Replies)
Hi,
I want to kill TCP connections which have status as TIME_WAIT & no PID
(as per the output of the "netstat - p" command).
Is there any command/utility available to kill connections to a specific port or IP address.
The problem is that these connections don't have process ID (see... (4 Replies)
Hello
netstat -p give below 6634176 connections as closed.How do we trace that which all connections are being closed on the server?
1366888371 data packet headers correctly predicted
1195906 connection requests
5227320 connection accepts
5992919... (6 Replies)
I'm trying to configure a firewall for AIX to accept incoming connections on ports 22 and 443 and deny everything else. All is ok; the server accepts connections only on 22 and 443, but after that I also need to accept all outgoing connections -- ssh and telnet, for example. So I started with
... (0 Replies)
Good morning, I need your help please
After Restarting Aps or connection, these are connections
tcp 0 0 10.80.1.26.57597 10.81.248.79.53008 ESTABLISHED
tcp 0 47 10.80.1.26.57607 10.81.248.79.53008 ESTABLISHED
tcp 0 0 ... (4 Replies)
Discussion started by: alexcol
4 Replies
LEARN ABOUT PHP
mongoclient.close
MONGOCLIENT.CLOSE(3) 1 MONGOCLIENT.CLOSE(3)MongoClient::close - Closes this connection
SYNOPSIS
public bool MongoClient::close ([boolean|string $connection])
DESCRIPTION
The MongoClient.close(3) method forcefully closes a connection to the database, even if persistent connections are being used. You should
never have to do this under normal circumstances.
PARAMETERS
o $connection
- If connection is not given, or FALSE then connection that would be selected for writes would be closed. In a single-node config-
uration, that is then the whole connection, but if you are connected to a replica set, close() will only close the connection to
the primary server. If connection is TRUE then all connections as known by the connection manager will be closed. This can
include connections that are not referenced in the connection string used to create the object that you are calling close on. If
connection is a string argument, then it will only close the connection identified by this hash. Hashes are identifiers for a con-
nection and can be obtained by calling MongoClient.getConnections(3).
RETURN VALUES
Returns if the connection was successfully closed.
EXAMPLES
Example #1
MongoClient.close(3) example
This example demonstrates how to selectively close all connections for secondaries only.
<?php
// Connect to a replicaset
$a = new MongoClient("mongodb://whisky:13000/?replicaset=seta");
$connections = $a->getConnections();
foreach ( $connections as $con )
{
// Loop over all the connections, and when the type is "SECONDARY"
// we close the connection
if ( $con['connection']['connection_type_desc'] == "SECONDARY" )
{
echo "Closing '{$con['hash']}': ";
$closed = $a->close( $con['hash'] );
echo $closed ? "ok" : "failed", "
";
}
}
?>
The above example will output:
Closing 'whisky:13001;X;4948': ok
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 1.3.0 | |
| | |
| | The $connection parameter to this function was |
| | added in 1.3.0. Before that, only the write con- |
| | nection would be closed by this method. |
| | |
| 1.2.0 | |
| | |
| | Before version 1.2.0 the driver would not use |
| | persistent connections by default, and all con- |
| | nections would be closed as soon as a MongoDB |
| | connection went out if scope. Since version 1.2.0 |
| | this is no longer the case and it is a bad idea |
| | to call close as you might end up overloading the |
| | server with connections under high load. |
| | |
+--------+---------------------------------------------------+
SEE ALSO MongoClient.getConnections(3).
PHP Documentation Group MONGOCLIENT.CLOSE(3)