Answer the question
In order to leave comments, you need to log in
Why does a tweet use up RAM?
When sending a tweet each time the RAM is filled with +20 MB and is not cleared. The next tweet is again a memory entry. Tracked down - this happens when uploading an image to twitter:
$reply = $cb->media_upload(array(
'media' => DIR . '/image.jpg'
));
require_once(DIR . '/codebird.php');
\Codebird\Codebird::setConsumerKey("ХХХХХХХХХХХХХХХХ", "ХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХ");
$cb = \Codebird\Codebird::getInstance();
$cb->setToken("ХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХ", "ХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХХ");
$reply = $cb->media_upload(array(
'media' => DIR . '/image.jpg'
));
$media_ids[] = $reply->media_id_string;
$media_ids = implode(',', $media_ids);
$params = array(
'status' => "Test post by twitter oauth",
'media_ids' => $media_ids
);
$reply = $cb->statuses_update($params);
$cb->logout();
Answer the question
In order to leave comments, you need to log in
What does the consumption of RAM look like? How does PHP work (via php-fpm? as an apache module? from the command line?). 20MB of RAM goes to the PHP interpreter itself. This is fine.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question