If you try to submit a node with "Post to LinkedIn" checked this always leads to a HTTP 500 page. If you looks a the logs you will see an error message of the type ..

PHP Fatal error: Allowed memory size of XXXX bytes exhausted (tried to allocate YYYY bytes)

No matter how much the allowed memory is increased, up to 512Mb, the problem persists. YYYY is fairly small.

After a little debugging this may be caused by a memory leak from

function linkedin_status_update_form_submit($form, &$form_state) {
  //Check the node is published.
  if ($form_state['values']['status'] != 1) {
    $form_state['values']['linkedin_status']['posting'] = 0;
    return;
  }
  if (
    $form_state['values']['linkedin_status']['posting'] == '1' &&
    !empty($form_state['values']['linkedin_status']['status']) &&
   user_access('update LinkedIn status') &&
    !empty($form_state['values']['nid'])
  ) {
    $node = node_load($form_state['values']['nid']);
    linkedin_status_set_status($form_state['values']['linkedin_status']['status'], $node);
  }
}

Can anyone else reproduce this problem?

Best, Paul

Comments

bellesmanieres’s picture

Can't reproduce. Are you sure you're change to php's memory_limit are taken into account ? You can check it from drupal status page.

davad’s picture

Status: Active » Closed (cannot reproduce)