You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by GitBox <gi...@apache.org> on 2023/01/03 09:23:45 UTC

[GitHub] [mina-sshd] garyiscoding opened a new issue, #306: Client startup sometimes take a long time

garyiscoding opened a new issue, #306:
URL: https://github.com/apache/mina-sshd/issues/306

   ### Version
   
   2.9.2
   
   ### Bug description
   
   Sometimes the client starts quickly and sometimes slowly. 
   
   long startTime = System.currentTimeMillis();
   client = SshClient.setUpDefaultClient();
   client.start();
   LOGGER.info(String.format("start client cost [%s] ms", System.currentTimeMillis() - startTime));
   
   When it is slow, it takes about 90 seconds to start. What is the solution
   
   ### Actual behavior
   
   start client cost [9783] ms
   
   ### Expected behavior
   
   start client cost [200] ms
   
   ### Relevant log output
   
   _No response_
   
   ### Other information
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] tomaswolf commented on issue #306: Client startup sometimes take a long time

Posted by GitBox <gi...@apache.org>.
tomaswolf commented on issue #306:
URL: https://github.com/apache/mina-sshd/issues/306#issuecomment-1369586061

   9783ms is 9.783s, not 90s.
   
   It is impossible to answer this question from the information given. Might be anything, like the JVM having to load classes first, or garbage collection skewing the timing, or a virus scanner interfering, or anything else.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] garyiscoding closed issue #306: Client startup sometimes take a long time

Posted by GitBox <gi...@apache.org>.
garyiscoding closed issue #306: Client startup sometimes take a long time
URL: https://github.com/apache/mina-sshd/issues/306


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] lshuq commented on issue #306: Client startup sometimes take a long time

Posted by "lshuq (via GitHub)" <gi...@apache.org>.
lshuq commented on issue #306:
URL: https://github.com/apache/mina-sshd/issues/306#issuecomment-1469790615

   Hello, we have encountered the same problem and used the same solution. Have you found the cause of the problem?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] garyiscoding commented on issue #306: Client startup sometimes take a long time

Posted by GitBox <gi...@apache.org>.
garyiscoding commented on issue #306:
URL: https://github.com/apache/mina-sshd/issues/306#issuecomment-1369720307

   > 9783ms is 9.783s, not 90s.
   > 
   > It is impossible to answer this question from the information given. Might be anything, like the JVM having to load classes first, or garbage collection skewing the timing, or a virus scanner interfering, or anything else.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] garyiscoding commented on issue #306: Client startup sometimes take a long time

Posted by GitBox <gi...@apache.org>.
garyiscoding commented on issue #306:
URL: https://github.com/apache/mina-sshd/issues/306#issuecomment-1369729305

   > 9783ms is 9.783s, not 90s.
   > 
   > It is impossible to answer this question from the information given. Might be anything, like the JVM having to load classes first, or garbage collection skewing the timing, or a virus scanner interfering, or anything else.
   
   We need to log in to different machines frequently to execute commands.
   We used to create a new client, then a new session, and then execute the command.
   After executing the command, we close the session and client.
   As a result, the next client creation will take a long time, even 200 seconds.
   
   Later we tried to keep the client open and create a new session when we needed to execute a command.
   The situation of delay does not appear any more. Is the method I used before wrong?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] garyiscoding closed issue #306: Client startup sometimes take a long time

Posted by GitBox <gi...@apache.org>.
garyiscoding closed issue #306: Client startup sometimes take a long time
URL: https://github.com/apache/mina-sshd/issues/306


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] tomaswolf commented on issue #306: Client startup sometimes take a long time

Posted by GitBox <gi...@apache.org>.
tomaswolf commented on issue #306:
URL: https://github.com/apache/mina-sshd/issues/306#issuecomment-1369844383

   Keeping the client open is certainly faster, but re-creating clients is also possible. JGit does so, for instance, and we never got any complaints. To find out why recreating clients sometimes takes such a long time in your setting, you'd have to profile your application. Perhaps that gives some insights.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org