Apache config generation error: SQLSTATE[HY000]: General error: 1 Can't create/write to file

Created:

2016-11-16 13:08:58 UTC

Modified:

2017-04-24 11:18:55 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Apache config generation error: SQLSTATE[HY000]: General error: 1 Can't create/write to file

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

The following error is shown after Plesk login:

New configuration files for the Apache web server were not created due to the errors in configuration templates: Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhost.php, error = Template_Exception: SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_322_0.MYD' (Errcode: 17) file: /usr/local/psa/admin/plib/Template/Processor.php line: 28 code: 0 Previous error: Template_Exception: SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_322_0.MYD' (Errcode: 17) file: /usr/local/psa/admin/plib/Template/Processor.php line: 28 code: 0 Previous error: Zend_Db_Statement_Exception: SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_322_0.MYD' (Errcode: 17) file: /usr/local/psa/admin/externals/Zend/Db/Statement/Pdo.php line: 234 code: 0 Previous error: PDOException: SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_322_0.MYD' (Errcode: 17) file: /usr/local/psa/admin/ex
ternals/Zend/Db/Statement/Pdo.php line: 228 code: HY000. Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files.

Cause

Resolution

  1. Make sure that the system has enough disk space:

    # df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/vzfs 287G 14G 273G 5% /
    none 4.0G 4.0K 4.0G 1% /dev
  2. If Plesk is running under container, make sure that it has free inodes:

    # df -i
    Filesystem Inodes IUsed IFree IUse% Mounted on
    /dev/vzfs 750000 331838 418162 45% /
    none 1048576 154 1048422 1% /dev
  3. Make sure that /tmp permissions are correct and it has enough disk space:

    # stat /tmp
    File: `/tmp'
    Size: 12288 Blocks: 24 IO Block: 4096 directory
    Device: f6h/246d Inode: 1023141322 Links: 3
    Access: (1777/drwxrwxrwt) Uid: ( 0/ root) Gid: ( 0/ root)
    Access: 2016-02-18 00:27:37.000000000 -0800
    Modify: 2016-02-18 01:49:28.000000000 -0800
    Change: 2016-02-18 01:49:28.000000000 -0800
  4. Reconfigure all domains:

    # /usr/local/psa/admin/bin/httpdmng --reconfigure-all
Have more questions? Submit a request
Please sign in to leave a comment.