Questions tagged [connection]

Refers to a connection used to transfer data between two endpoints, such as between a client and a web, database, web service or other server.

A connection is a session established between two communications endpoint applications.

9426 questions
69
votes
7 answers

Cannot connect to MySQL 4.1+ using old authentication

I'm trying to connect to a mySQL database at http://bluesql.net, but when I try to connect, it gives this error: Connect Error (2000) mysqlnd cannot connect to MySQL 4.1+ using old authentication I've looked into this, and it has to do with some…
B T
  • 46,771
  • 31
  • 164
  • 191
67
votes
16 answers

How to check if internet connection is present in Java?

How do you check if you can connect to the internet via java? One way would be: final URL url = new URL("http://www.google.com"); final URLConnection conn = url.openConnection(); ... if we got here, we should have net ... But is there something…
Chris
  • 14,451
  • 18
  • 70
  • 73
65
votes
6 answers

Hibernate Slow to Acquire Postgres Connection

I'm having a really difficult time debugging this problem. Whenever I try to establish a connection with postgres, it takes a whole minute. After the connection is established, everything is fine. I've tried disabling all the mappings and not…
Jason Huntley
  • 3,719
  • 2
  • 17
  • 26
60
votes
13 answers

How to fix HttpException: Connection closed before full header was received

I have recently upgraded my flutter version in my app. But when I want to debug the application, it shows me the following error. Error connecting to the service protocol: HttpException: Connection closed before full header was received, URI =…
Juthi Sarker Aka
  • 1,207
  • 2
  • 9
  • 17
59
votes
4 answers

Android event for internet connectivity state change

I am making an app where a user is uploading information and files to my server on a somewhat frequent basis. This is done in new threads through a dedicated uploader service. I know from this thread Detect whether there is an Internet connection…
akhalsa
  • 2,281
  • 3
  • 24
  • 43
59
votes
6 answers

How to kill MySQL connections

I'm building a website with MySQL. I'm using TOAD for MySQL and suddenly I can't connect to the database as I'm getting an error: "Too many connections" Is there any way in Toad for MySQL to view existing connections to be able to kill them or…
leora
  • 163,579
  • 332
  • 834
  • 1,328
58
votes
10 answers

How do I shutdown a Node.js http(s) server immediately?

I have a Node.js application that contains an http(s) server. In a specific case, I need to shutdown this server programmatically. What I am currently doing is calling its close() function, but this does not help, as it waits for any kept alive…
Golo Roden
  • 112,924
  • 78
  • 260
  • 376
57
votes
4 answers

Why does PDO print my password when the connection fails?

I have a simple website where I establish a connection to a MySQL server using PDO. $dbh = new PDO('mysql:host=localhost;dbname=DB;port=3306', 'USER', 'SECRET', array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET…
The Surrican
  • 26,829
  • 23
  • 111
  • 159
57
votes
3 answers

What is the functionality of setSoTimeout and how it works?

I'm trying to learn Socket by myself. I'm little bit confused by following text from Oracle website. I have some questions regarding that. Thanks in advance for any clear explanation. setSoTimeout public void setSoTimeout(int timeout) throws…
Bernard
  • 3,880
  • 18
  • 49
  • 82
56
votes
2 answers

Is it safe to use a static java.sql.Connection instance in a multithreaded system?

I'm running a web application on Tomcat. I have a class that handles all DB queries. This class contains the Connection object and methods that returns query results. This is the connection object: private static Connection conn = null; It has only…
Asher Saban
  • 4,343
  • 12
  • 43
  • 54
56
votes
11 answers

Oracle - What TNS Names file am I using?

Sometimes I get Oracle connection problems because I can't figure out which tnsnames.ora file my database client is using. What's the best way to figure this out? ++happy for various platform solutions.
Mark Harrison
  • 267,774
  • 112
  • 308
  • 434
55
votes
13 answers

Updating from svn repository returns "Could not read chunk size" error

When updating from subversion repository using tortoise svn client I get error looking like that: Could not read chunk size: An existing connection was forcibly closed by the remote host. It doesn't prevent me from updating, just interrupts update…
Denis
  • 567
  • 1
  • 5
  • 7
55
votes
35 answers

Failed to connect to mysql at 127.0.0.1:3306 with user root access denied for user 'root'@'localhost'(using password:YES)

I've been trying to create a new database connection on workbench. However, every time I test a connection there is an error message that says Failed to connect to mysql at 127.0.0.1:3306 with user root access denied for user…
cpl
  • 551
  • 1
  • 4
  • 3
55
votes
5 answers

How to close idle connections in PostgreSQL automatically?

Some clients connect to our postgresql database but leave the connections opened. Is it possible to tell Postgresql to close those connection after a certain amount of inactivity ? TL;DR IF you're using a Postgresql version >= 9.2 THEN use…
Stephan
  • 37,597
  • 55
  • 216
  • 310
53
votes
1 answer

What exactly is a connection in R?

I've read through and successfully use ?connections in R but I really don't understand what they are. I get that I can download a file, read and write a compressed file, ... (that is I understand what the result of using a conection (open, do stuff,…
andrew wong
  • 797
  • 1
  • 5
  • 8