Announcement

Collapse
No announcement yet.

Fatal error: Allowed memory size of 8388608 bytes exhausted

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #76
    Originally posted by Philip
    Umm... His limit seems to be 48MB
    My bad. Miscounted the digits.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #77
      Originally posted by Mamochka
      Change memory_limit has not brought successes,if other decisions?

      Fatal error: Allowed memory size of 50331648 bytes exhausted (tried to allocate 655036 bytes) in /home/www/search.php on line 956

      Fatal error: Allowed memory size of 50331648 bytes exhausted (tried to allocate 0 bytes) in Unknown on line 0
      i'd update your version of PHP to 4.3.6 or 4.3.4 if you haven't and make sure if you're using Zend Optimiser to use latest version as older versions of Zend Optimiser have been know to cause memory leaks manifesting itself as 'allowed memory size being exhausted' messages
      :: Always Back Up Forum Database + Attachments BEFORE upgrading !
      :: Nginx SPDY SSL - World Flags Demo [video results]
      :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

      Comment


      • #78
        I've read through this thread, but I am wondering if there is anything I can do that will not require my host editing the PHP.ini file? I have the Similar Threads feature disabled to help reduce the intensity of these errors I am receiving.

        My board's URL is: http://www.kirupaforum.com and searching for a common term such as "flash" almost always causes an error for me and other users. Is there anything via PHPmyAdmin that I can change or something? I don't think I have root access though.

        My server only has 8MB specified. Also, I never really had this issue with vB2, but this seems to occur only in vB3. Is it due to an error in installation that I may have made?

        Thanks!
        Kirupa
        Last edited by kirupa; Tue 4 May '04, 8:11pm.

        Comment


        • #79
          Maybe try deleting the search index and include only recent threads in it ? I'm just guessing...
          www.speedguide.net | forums.speedguide.net
          Life would be much easier if I had the source code...

          Comment


          • #80
            Oh - that sounds like a good idea. If there are no other resolutions that can retain the full search range, I may give that a shot

            Comment


            • #81
              eva2000,Zachery

              I have Linux; PHP v4.3.6; .

              PHP API 20020918
              PHP Extension 20020429
              Zend Extension 20021010

              What to do?

              P.S. I have vb 3.0.1

              Comment


              • #82
                Originally posted by Mamochka
                eva2000,Zachery

                I have Linux; PHP v4.3.6; .

                PHP API 20020918
                PHP Extension 20020429
                Zend Extension 20021010

                What to do?

                P.S. I have vb 3.0.1
                not sure, try reuploading your vB3.01 php files again particularly search.php

                was the search term meant /expected to return alot of threads ?

                at http://www.vbulletin.com/forum/showp...2&postcount=31 also suggests max_allowed_packet could help what is your my.cnf settings like ?
                Last edited by George L; Wed 5 May '04, 4:50pm.
                :: Always Back Up Forum Database + Attachments BEFORE upgrading !
                :: Nginx SPDY SSL - World Flags Demo [video results]
                :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

                Comment


                • #83
                  Originally posted by eva2000
                  not sure, try reuploading your vB3.01 php files again particularly search.php

                  was the search term meant /expected to return alot of threads ?

                  at http://www.vbulletin.com/forum/showp...2&postcount=31 also suggests max_allowed_packet could help what is your my.cnf settings like ?
                  My max_allowed_packet is 2 Mb.
                  Reuploading search.php has not brought success.

                  Comment


                  • #84
                    Gentlemen,

                    I've encountered the same problems. I'll give as much detail as possible....

                    Website
                    http://www.cgtalk.com

                    Where it happens
                    search only

                    Error
                    Fatal error: Allowed memory size of 16777216 bytes exhausted at (null):0 (tried to allocate 8 bytes) in /var/www/html/search.php on line 973
                    Servers
                    2 dedicated servers load balanced
                    Both Dual Xeon 2.2GHz
                    2GB RAM each
                    connecting to MySQL database

                    Server loads when error occurs
                    0.74, 0.61, 0.62
                    0.29, 0.46, 0.39

                    PHP Version
                    PHP Version 4.3.2

                    MySQL my.cnf (/etc/my.cnf)

                    [mysqld]
                    datadir=/var/lib/mysql
                    socket=/var/lib/mysql/mysql.sock
                    set-variable = max_connections=800
                    set-variable = key_buffer=32M
                    set-variable = myisam_sort_buffer_size=64M
                    set-variable = join_buffer=2M
                    set-variable = record_buffer=2M
                    set-variable = sort_buffer=4M
                    set-variable = table_cache=1024
                    set-variable = thread_cache_size=128
                    set-variable = wait_timeout=3000
                    set-variable = connect_timeout=10
                    set-variable = max_allowed_packet=16M
                    set-variable = max_connect_errors=10
                    [mysql.server]
                    user=mysql
                    basedir=/var/lib
                    [safe_mysqld]
                    err-log=/var/log/mysqld.log
                    pid-file=/var/run/mysqld/mysqld.pid
                    open_files_limit=8192
                    [mysqldump]
                    quick
                    set-variable = max_allowed_packet=16M
                    [myisamchk]
                    set-variable = key_buffer=64M
                    set-variable = sort_buffer=64M
                    set-variable = read_buffer=16M
                    set-variable = write_buffer=16M
                    MySQL Extended Status
                    +--------------------------+------------+
                    | Variable_name | Value |
                    +--------------------------+------------+
                    | Aborted_clients | 79 |
                    | Aborted_connects | 2 |
                    | Bytes_received | 21234554 |
                    | Bytes_sent | 1507627696 |
                    | Com_admin_commands | 469 |
                    | Com_alter_table | 0 |
                    | Com_analyze | 0 |
                    | Com_backup_table | 0 |
                    | Com_begin | 0 |
                    | Com_change_db | 10534 |
                    | Com_change_master | 0 |
                    | Com_check | 0 |
                    | Com_commit | 0 |
                    | Com_create_db | 0 |
                    | Com_create_function | 0 |
                    | Com_create_index | 0 |
                    | Com_create_table | 0 |
                    | Com_delete | 202 |
                    | Com_drop_db | 0 |
                    | Com_drop_function | 0 |
                    | Com_drop_index | 0 |
                    | Com_drop_table | 0 |
                    | Com_flush | 0 |
                    | Com_grant | 0 |
                    | Com_insert | 2760 |
                    | Com_insert_select | 6 |
                    | Com_kill | 0 |
                    | Com_load | 0 |
                    | Com_load_master_table | 0 |
                    | Com_lock_tables | 0 |
                    | Com_optimize | 0 |
                    | Com_purge | 0 |
                    | Com_rename_table | 0 |
                    | Com_repair | 0 |
                    | Com_replace | 70 |
                    | Com_replace_select | 0 |
                    | Com_reset | 0 |
                    | Com_restore_table | 0 |
                    | Com_revoke | 0 |
                    | Com_rollback | 0 |
                    | Com_select | 60719 |
                    | Com_set_option | 0 |
                    | Com_show_binlogs | 0 |
                    | Com_show_create | 0 |
                    | Com_show_databases | 0 |
                    | Com_show_fields | 0 |
                    | Com_show_grants | 0 |
                    | Com_show_keys | 0 |
                    | Com_show_logs | 0 |
                    | Com_show_master_status | 0 |
                    | Com_show_open_tables | 0 |
                    | Com_show_processlist | 0 |
                    | Com_show_slave_status | 0 |
                    | Com_show_status | 1 |
                    | Com_show_innodb_status | 0 |
                    | Com_show_tables | 0 |
                    | Com_show_variables | 0 |
                    | Com_slave_start | 0 |
                    | Com_slave_stop | 0 |
                    | Com_truncate | 0 |
                    | Com_unlock_tables | 0 |
                    | Com_update | 7075 |
                    | Connections | 10069 |
                    | Created_tmp_disk_tables | 436 |
                    | Created_tmp_tables | 7328 |
                    | Created_tmp_files | 0 |
                    | Delayed_insert_threads | 0 |
                    | Delayed_writes | 0 |
                    | Delayed_errors | 0 |
                    | Flush_commands | 1 |
                    | Handler_delete | 346 |
                    | Handler_read_first | 6704699 |
                    | Handler_read_key | 2057526 |
                    | Handler_read_next | 21599098 |
                    | Handler_read_prev | 72 |
                    | Handler_read_rnd | 1511635 |
                    | Handler_read_rnd_next | 15184448 |
                    | Handler_update | 11767 |
                    | Handler_write | 4729012 |
                    | Key_blocks_used | 27996 |
                    | Key_read_requests | 20004550 |
                    | Key_reads | 27969 |
                    | Key_write_requests | 3647 |
                    | Key_writes | 3084 |
                    | Max_used_connections | 46 |
                    | Not_flushed_key_blocks | 0 |
                    | Not_flushed_delayed_rows | 0 |
                    | Open_tables | 120 |
                    | Open_files | 184 |
                    | Open_streams | 0 |
                    | Opened_tables | 130 |
                    | Questions | 91321 |
                    | Select_full_join | 4970 |
                    | Select_full_range_join | 617 |
                    | Select_range | 20341 |
                    | Select_range_check | 0 |
                    | Select_scan | 13517 |
                    | Slave_running | OFF |
                    | Slave_open_temp_tables | 0 |
                    | Slow_launch_threads | 0 |
                    | Slow_queries | 2 |
                    | Sort_merge_passes | 0 |
                    | Sort_range | 4617 |
                    | Sort_rows | 1600702 |
                    | Sort_scan | 11654 |
                    | Table_locks_immediate | 109040 |
                    | Table_locks_waited | 142 |
                    | Threads_cached | 14 |
                    | Threads_created | 47 |
                    | Threads_connected | 33 |
                    | Threads_running | 1 |
                    | Uptime | 1408 |
                    +--------------------------+------------+
                    Server Usage
                    No other sites run on these two servers. Only CGTalk.com.

                    VBulletin Version
                    VB3.0.1

                    Apache Settings

                    KeepAlive Off
                    MaxKeepAliveRequests 100
                    KeepAliveTimeout 15
                    <IfModule prefork.c>
                    StartServers 8
                    MinSpareServers 5
                    MaxSpareServers 20
                    MaxClients 150
                    MaxRequestsPerChild 1000
                    </IfModule>
                    <IfModule worker.c>
                    StartServers 2
                    MaxClients 150
                    MinSpareThreads 25
                    MaxSpareThreads 75
                    ThreadsPerChild 25
                    MaxRequestsPerChild 0
                    Any ideas?

                    Thanks in advance,

                    Leonard

                    Comment


                    • #85
                      The change needs to be made in php.ini as per Scott's post near the beginning of this thread:

                      http://www.vbulletin.com/forum/showp...77&postcount=4
                      Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                      Change CKEditor Colors to Match Style (for 4.1.4 and above)

                      Steve Machol Photography


                      Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                      Comment


                      • #86
                        Originally posted by Steve Machol
                        The change needs to be made in php.ini as per Scott's post near the beginning of this thread:

                        http://www.vbulletin.com/forum/showp...77&postcount=4
                        Steve,

                        My above posting reflects that my settings are already at 16MB.

                        I have now raised it to 32MB and it works. Will monitor the server loads, as this is the highest memory allocation we've ever put into our server settings.

                        Leonard

                        Comment


                        • #87
                          Originally posted by Leonard
                          Steve,

                          My above posting reflects that my settings are already at 16MB.

                          I have now raised it to 32MB and it works. Will monitor the server loads, as this is the highest memory allocation we've ever put into our server settings.

                          Leonard
                          Hi all,

                          After setting php.ini to 32MB, the problem has resurfaced again while attempting to rebuild the "Similar Threads" via the control panel. Memory is being exhausted at 32MB.

                          I feel unsafe to increase the limit further, as the memory consumption of the servers will be rather high. Are these concerns unfounded?

                          Thanks in advance for any assistance.

                          Leonard

                          Comment


                          • #88
                            I would increase it temporarily to allow you to finsh rebuilding Similar Threads, then change it back after you've done this.
                            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                            Change CKEditor Colors to Match Style (for 4.1.4 and above)

                            Steve Machol Photography


                            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                            Comment


                            • #89
                              I was also having this problem with searching for similar threads when a thread was created. To work around this problem I have added a hard limit in the loop which gets the postid's which contain the same words as the new thread. This means that the system only checks for the 40,000 most recent posts matching the thread but for me this is a tradeoff I am happy with. Below is my change...

                              I have replaced
                              PHP Code:
                                  $posts $DB_site->query("
                                        SELECT postid, wordid,
                                            CASE intitle
                                                WHEN 0 THEN score
                                                WHEN 1 THEN score + 
                              $vboptions[posttitlescore]
                                               WHEN 2 THEN score + 
                              $vboptions[threadtitlescore] + $vboptions[posttitlescore]
                                            ELSE score
                                            END AS score
                                        FROM " 
                              TABLE_PREFIX "postindex" iif($searchthread"
                                        INNER JOIN " 
                              TABLE_PREFIX "post USING (postid)
                                        INNER JOIN " 
                              TABLE_PREFIX "thread AS thread USING (threadid)") . "
                                        WHERE 
                              $wordids $intitle
                                        " 
                              iif($searchthread" AND thread.threadid = $searchthreadid")
                                    );
                                   while(
                              $post $DB_site->fetch_array($posts))
                                    {
                                       
                              $wordlists[$post['postid']] .= " ,$post[wordid],";
                                        
                              $postscores[$post['postid']] += $post['score'];
                                    } 
                              with

                              PHP Code:
                                  $posts $DB_site->query("
                                       SELECT postid, wordid,
                                           CASE intitle
                                               WHEN 0 THEN score
                                               WHEN 1 THEN score + 
                              $vboptions[posttitlescore]
                                               WHEN 2 THEN score + 
                              $vboptions[threadtitlescore] + $vboptions[posttitlescore]
                                           ELSE score
                                           END AS score
                                       FROM " 
                              TABLE_PREFIX "postindex" iif($searchthread"
                                       INNER JOIN " 
                              TABLE_PREFIX "post USING (postid)
                                       INNER JOIN " 
                              TABLE_PREFIX "thread AS thread USING (threadid)") . "
                                       WHERE 
                              $wordids $intitle
                                       " 
                              iif($searchthread" AND thread.threadid = $searchthreadid").
                                       
                              "ORDER BY postid DESC"
                                   
                              );
                                   
                              $nick_post_count 0;
                                   while(
                              $post $DB_site->fetch_array($posts) && $nick_post_count 40000)
                                   {
                                       
                              $nick_post_count++;
                                       
                              //echo "$nick_post_count\n<br/>";
                                       
                              $wordlists[$post['postid']] .= " ,$post[wordid],";
                                       
                              $postscores[$post['postid']] += $post['score'];
                                   } 
                              Note, the two changes are an order by postid desc to make sure the most recent posts are first. The second is a count to do a little sanity checking. I'm far too used to C programming and wanted bounds checking but thats an alternative, its not ideal but it does the job and avoids playing around too much with the code. In case anyone wonders, the number my server was stopping on was about 45,000 so i picked a number low enough to ensure that the number of returned posts was still useful.

                              Nick

                              Comment


                              • #90
                                I'm getting the same error - in showgroups.php - vB 3.0.3

                                I've had to increased my memory_limit to 48MB before this will work.... is this a good idea?



                                The page that is generated by showgroups.php is HUGE (8500 members) - surely vB 3.1 would be better off breaking it down into smaller pages??
                                Last edited by tox; Tue 6 Jul '04, 2:38pm.

                                Comment

                                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                                Working...
                                X