Posts

Showing posts from April, 2017

SOLVED: sftp Error: Connection timed out after 20 seconds of inactivity

Error:Connection timed out after 20 seconds of inactivity
I just want to share a peculiar sftp connectivity issue that we encountered recently.
This is the message we got when trying to connect to the server using sftp
Status:Connecting to mydomain.com... Response:fzSftp started, protocol_version=8 Command:keyfile "somefile.ppk" Command:open "user@mydomain.com" 22 Error:Connection timed out after 20 seconds of inactivity Error:Could not connect to server
We usually connect to my remote server using sftp to upload and download the work files.
All was well till yesterday, when suddenly, the connectivity to the server was not happening.
We distinctly remember being able to connect till sometime back, before the above error cropped up suddenly.
We were breaking our heads as to why the connection was not happening.
Rolled back in time and evaluated the things that we did during the past hours. It was suddenly that we got a brainwave that solved the problem.
The explanation:
It occurre…

Maximum allowed value for a string variable content in JavaScript

What is the maximum string content that can fit inside a Javascript variable?

I had this requirement where my Ajax script would return a sizeable amount of data for processing.

It was at this moment that I wondered if the returned value would fit inside a variable. I browsed through some of the available feedback in a Google search.

Most of them opined that there is no limit on the string variable content.

How do we check the maximum value for a string variable?

So, I thought, "let us check it in real time".

As per my test, I found out that a large string with a length of 102400 was initialized without generating any JavaScript error.

I am sure, nobody would require anything more than this inside their JavaScript variable.

Here is my statement:
I tested by initializing a JavaScript variable, in the browser console, with over 100,000 characters without an error.

My test machine was an I7 with 4GB of RAM.