I see you are starting a new background job server each time user session is started (since this is a Session_Start method) and curious how many background processing servers do you have? This may quickly grow the number of servers to an unbounded value, giving a lot of problems. You should start one or multiple servers in the Application_Start method instead.
Also, ensure your background job server is started only after all the configuration logic completed – I see in the code that it’s started, and then other configuration logic is called (like modifying filters, adding a logic, etc). So in this case some background jobs may be executed without using the correct filters, and some background processes may be started without any logger at all.
Also, don’t modify the
JobStorage.Current property when application initialization is complete. All the classes that use it may be initialized with a specific job storage:
var storage = new SqlServerStorage("connection_string");
var backgroundJobs = new BackgroundJobClient(storage);
var recurringJobs = new RecurringJobManager(storage);
var server = new BackgroundJobServer(storage);
// and so on