Prevent Multiple Form Submissions (Server side)
I had the exact same problem and managed to fix it using the Locking mechanisms from Drupal

In the validate function I used:

function mymodule_custom_form_validate($form, &amp;$form_state){
  if (lock_acquire('your_custom_lock_name')) {
    // long operations here
  } else {
    form_set_error("", t("You submitted this form already."));
  }
}


And in the submit function I released the lock:

function mymodule_custom_form_submit($form, &amp;$form_state){
  // submit code
  lock_release('your_custom_lock_name');
}