Depending on the exact situation, this module makes one or more HTTP requests to the CAS server using Guzzle (the HTTP library). We are not currently specifying a timeout value for these requests, which could be dangerous if there is some problem with the CAS server. It could cause the Drupal site (acting as a client) to hang while it waits a long time for that request to complete, potentially taking down the Drupal site as more and more PHP processes are consumed with this networking wait.

The solution is to specify a reasonable timeout value for the HTTP requests that we make to the CAS server. I think a good default is 5 seconds. Could even add this as a config option under an "advanced" fieldset.

CommentFileSizeAuthor
#3 connection-timeout-2838660.patch7.32 KBbkosborne

Comments

bkosborne created an issue. See original summary.

metzlerd’s picture

I would definitely advocate for this, but 5 seconds seems a bit short for default, maybe 10?

bkosborne’s picture

Status: Active » Needs review
StatusFileSize
new7.32 KB

Status: Needs review » Needs work

The last submitted patch, 3: connection-timeout-2838660.patch, failed testing.

bkosborne’s picture

Status: Needs work » Fixed

I went with 10 seconds as suggested. I agree that's a more reasonable time.

  • bkosborne committed 6cffe47 on 8.x-1.x
    Issue #2838660 by bkosborne: Specify a connection timeout on the CAS...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.