Receiving 502 on page load in a codeigniter project using bastion AWS

Viewed 126

My Codeigniter project on AWS was working fine. For security reasons, we implemented bastion, created a test domain with all existing code. This new test domain seems to work fine, but few pages when loaded gives 502 bad gateway. Any ideas how to solve this? I have around 14 session variables prior to loading this page which is giving 502 error.

  1. Is this something can be fixed using Apache configuration?
  2. Something to deal with codeigniter session / other settings?

Came across https://developernote.com/2012/09/how-i-fixed-nginx-502-bad-gateway-error/ but not sure how to apply for Apache.

Have been spending hours trying to figure out the issue. Please help.

1 Answers

on further invenstigation, I am able to find CI (v2.2.0) session cookies length is limited to 4KB. Updated application/congif/config.php to use database for sessions as below and that solved the issue.

$config['sess_use_database'] = TRUE; $config['sess_table_name'] = 'ci_sessions';

Note: You may have to create ci_sessions table in the database or update the structure as required.

Related