WebFaction
Community site: login faq
1
1

I am running a Drupal site and from time to time, I come up with too many connections causing an error to my site displaying a dead screen with the following message;

PDOException: SQLSTATE[HY000] [2002] No such file or directory in lock_may_be_available() (line 167 of /home/my_username/webapps/my_app_name/includes/lock.inc).

And one of the suggestion from Drupal community is not use "localhost" as the hostname but the actual database hostname. So how can I find the database hostname?

asked 24 Jan '13, 08:42

Romel
8511117
accept rate: 40%


You can run "hostname" at the command line in a SSH session, eg:

[user@webNNN ~]$ hostname
webNNN.webfaction.com
permanent link

answered 24 Jan '13, 10:45

seanf
12.2k42136
accept rate: 37%

I thought the problem was gone because I did not notice it for many days, but again it came back. I change my dburl into the following

$db_url = 'mysqli://db_username:db_password@web###.webfaction.com/db_name';

instead of

$db_url = 'mysqli://db_username:db_password@localhost/db_name';

I hope the error will go, crossing my fingers... No error so far from 15 minutes of testing and the site seems to load faster than before...

(18 Feb '13, 01:44) Romel

Hello,

If the problem is not resolved, then please submit a ticket via our support system, and we will be happy to investigate.

Sincerely,

Valentin I.

(18 Feb '13, 08:07) valentini
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×84
×63
×1

question asked: 24 Jan '13, 08:42

question was seen: 8,118 times

last updated: 18 Feb '13, 08:07

                              
WEBFACTION
REACH US
SUPPORT
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM