1040 - Too many connections

SELECT * FROM config_index WHERE id=1 LIMIT 1

--ERROR START--
Array
(
    [0] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 38
            [function] => errorDB
            [args] => Array
                (
                    [0] => SELECT * FROM config_index WHERE id=1 LIMIT 1
                    [1] => 1040
                    [2] => Too many connections
                )

        )

    [1] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 47
            [function] => query
            [args] => Array
                (
                    [0] => SELECT * FROM config_index WHERE id=1 LIMIT 1
                )

        )

    [2] => Array
        (
            [file] => /home/avent/public_html/joc.php
            [line] => 13
            [function] => getRows
            [args] => Array
                (
                    [0] => SELECT * FROM config_index WHERE id=1 LIMIT 1
                )

        )

)
--ERROR END--1040 - Too many connections

SELECT * FROM setari WHERE id=1 LIMIT 1

--ERROR START--
Array
(
    [0] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 38
            [function] => errorDB
            [args] => Array
                (
                    [0] => SELECT * FROM setari WHERE id=1 LIMIT 1
                    [1] => 1040
                    [2] => Too many connections
                )

        )

    [1] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 47
            [function] => query
            [args] => Array
                (
                    [0] => SELECT * FROM setari WHERE id=1 LIMIT 1
                )

        )

    [2] => Array
        (
            [file] => /home/avent/public_html/joc.php
            [line] => 18
            [function] => getRows
            [args] => Array
                (
                    [0] => SELECT * FROM setari WHERE id=1 LIMIT 1
                )

        )

)
--ERROR END--1040 - Too many connections

SELECT id,nume FROM categorii

--ERROR START--
Array
(
    [0] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 38
            [function] => errorDB
            [args] => Array
                (
                    [0] => SELECT id,nume FROM categorii
                    [1] => 1040
                    [2] => Too many connections
                )

        )

    [1] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 47
            [function] => query
            [args] => Array
                (
                    [0] => SELECT id,nume FROM categorii
                )

        )

    [2] => Array
        (
            [file] => /home/avent/public_html/joc.php
            [line] => 34
            [function] => getRows
            [args] => Array
                (
                    [0] => SELECT id,nume FROM categorii
                )

        )

    [3] => Array
        (
            [file] => /home/avent/public_html/joc.php
            [line] => 39
            [function] => get_cats
            [args] => Array
                (
                )

        )

)
--ERROR END--1040 - Too many connections

SELECT id FROM categorii WHERE nume='jocuri fotbal' LIMIT 1

--ERROR START--
Array
(
    [0] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 38
            [function] => errorDB
            [args] => Array
                (
                    [0] => SELECT id FROM categorii WHERE nume='jocuri fotbal' LIMIT 1
                    [1] => 1040
                    [2] => Too many connections
                )

        )

    [1] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 47
            [function] => query
            [args] => Array
                (
                    [0] => SELECT id FROM categorii WHERE nume='jocuri fotbal' LIMIT 1
                )

        )

    [2] => Array
        (
            [file] => /home/avent/public_html/joc.php
            [line] => 28
            [function] => getRows
            [args] => Array
                (
                    [0] => SELECT id FROM categorii WHERE nume='jocuri fotbal' LIMIT 1
                )

        )

    [3] => Array
        (
            [file] => /home/avent/public_html/joc.php
            [line] => 42
            [function] => get_cat_id
            [args] => Array
                (
                    [0] => jocuri-fotbal
                )

        )

)
--ERROR END--1040 - Too many connections

SELECT id FROM jocuri WHERE titlu='penalty shootout game' LIMIT 1

--ERROR START--
Array
(
    [0] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 38
            [function] => errorDB
            [args] => Array
                (
                    [0] => SELECT id FROM jocuri WHERE titlu='penalty shootout game' LIMIT 1
                    [1] => 1040
                    [2] => Too many connections
                )

        )

    [1] => Array
        (
            [file] => /home/avent/public_html/includes/db_functions.php
            [line] => 47
            [function] => query
            [args] => Array
                (
                    [0] => SELECT id FROM jocuri WHERE titlu='penalty shootout game' LIMIT 1
                )

        )

    [2] => Array
        (
            [file] => /home/avent/public_html/joc.php
            [line] => 47
            [function] => getRows
            [args] => Array
                (
                    [0] => SELECT id FROM jocuri WHERE titlu='penalty shootout game' LIMIT 1
                )

        )

    [3] => Array
        (
            [file] => /home/avent/public_html/joc.php
            [line] => 61
            [function] => get_id_joc
            [args] => Array
                (
                    [0] => penalty-shootout-game
                    [1] => 
                )

        )

)
--ERROR END--