Error when I Upgraded from 10.0.3 to 10.0.41

Post

Posted
Rating:
#8456 (In Topic #2791)
kmw
Avatar
Standard member
kmw is in the usergroup ‘Fan in action’

PHP ERROR [1] Allowed memory size of 67108864 bytes exhausted (tried to allocate 47188648 bytes) in sources/files2.php on line 104

On the index.php?page=start I get the following

Critical error – bailing out

This is an error that has been elevated to critical error status because it occurred during the primary error mechanism reporting system itself (possibly due to it occurring within the standard output framework). It may be masking a secondary error that occurred before this, but was never output - if so, it is likely strongly related to this one, thus fixing this will fix the other.
PHP ERROR [1] Allowed memory size of 67108864 bytes exhausted (tried to allocate 47188648 bytes) in sources/files2.php on line 104

how do I change the memory size on line 104
of the sources/file2.php (see below)
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
function cache_and_carry($func, $args, $timeout = null)
{
    global $HTTP_DOWNLOAD_MIME_TYPE, $HTTP_DOWNLOAD_SIZE, $HTTP_DOWNLOAD_URL, $HTTP_MESSAGE, $HTTP_MESSAGE_B, $HTTP_NEW_COOKIES, $HTTP_FILENAME, $HTTP_CHARSET, $HTTP_DOWNLOAD_MTIME;

    $ret = mixed();

    $path = get_custom_file_base() . '/safe_mode_temp/' . md5(serialize($args)) . '.bin';
    if (is_file($path) && (($timeout === null) || (filemtime($path) > time() - $timeout * 60))) {
        $_ret = cms_file_get_contents_safe($path);
        if ($func == 'http_download_file') {
            $ret = @unserialize($_ret);
        } else {
            $ret = $_ret;
        }
    } else {
        $_ret = call_user_func_array($func, $args);
        require_code('files');
        if ($func == 'http_download_file') {
            $ret = array($_ret, $HTTP_DOWNLOAD_MIME_TYPE, $HTTP_DOWNLOAD_SIZE, $HTTP_DOWNLOAD_URL, $HTTP_MESSAGE, $HTTP_MESSAGE_B, $HTTP_NEW_COOKIES, $HTTP_FILENAME, $HTTP_CHARSET, $HTTP_DOWNLOAD_MTIME);
            if ($_ret !== null) {
                cms_file_put_contents_safe($path, serialize($ret), FILE_WRITE_FAILURE_SOFT | FILE_WRITE_FIX_PERMISSIONS);
            }
        } else {
            $ret = is_string($_ret) ? $_ret : serialize($_ret);
            cms_file_put_contents_safe($path, $ret, FILE_WRITE_FAILURE_SOFT | FILE_WRITE_FIX_PERMISSIONS);
        }
    }
    return $ret;
}

 
   
Online now: No Back to the top

Post

Posted
Rating:
#8459
Avatar
Site staff
Adam Edington is in the usergroup ‘Super-moderators’
Hello,

Thanks for the report. Our lead developer is extremely busy at the moment but I am sure this issue will be looked at in the next couple of weeks.

Regards,
Adam
Online now: No Back to the top

Post

Posted
Rating:
#8543
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Hi,

I'm sorry you didn't receive a timely response to this topic.

Thank you for showing the affected code clearly in your report here.

This is a really odd issue.

Tracing the code, the only possibility I could see was this 0004843: Large oEmbed responses should not be accepted - Composr CMS feature tracker - and this seems very unlikely to happen in practice.
I suppose if you were very unlucky and reference a site with a buggy oEmbed endpoint it could happen.

To answer your direct question, the memory limit can be increased via an unofficial option in Commandr (Admin Zone > Tools > Commandr, assuming you have it installed).

Type this command exactly (it needs the leading colon, trailing semicolon, and it is M not MB):

Code

:set_value('memory_limit','128M');

This would set a limit of 128MB on the server, which hopefully would be enough.

However, really nothing should be trying to pull a file over 64MB out of the HTTP cache on the home page. So while this may get rid of the error, it should never get into this situation in the first place.

I'd try manually editing the pages/comcode_custom/panel*.txt and pages/comcode_custom/start.txt files to remove stuff temporarily until you can trace the cause, and then come back to me on it. If you'd like me to personally investigate drop me an email, chris@ocproducts.com.

I apologise again for this being a very late reply. I had no ability to do support for the last 3 months, and this is a very technical development issue.

Best,
Chris


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Forum statistics:
  • 2,051 topics, 7,194 posts, 10,824 members
  • Our newest member is gracenayjanjoh
Birthdays:
Back to Top