Home > Back-end >  Local test normal code, using Java - run the jar jar package is normal after packaging, deployment t
Local test normal code, using Java - run the jar jar package is normal after packaging, deployment t

Time:01-03

When sending emails, because do not want to affect the user experience, so in the mainline Cheng Kaiqi a new process line (95-97) send mail, open thread used after the return to redirect to redirect comment pieces refresh interface,

When local test, there is no question that comments can refresh instantly refresh, email is normal also, is still normal after packaged into a jar, but once deployed to the docker, comments can't refresh, the console can output the aaa (98), so you should perform the return, but don't know why I can't call another function, the console without Exception, in multithreaded catches Exception directly, no abnormal display, can be ruled out is redirect code problem, because the rest of the normal redirect code,

Support a move, every brother please help to change a bug for two days, thank you!

CodePudding user response:

Didn't see your thread processing, may be closed thread processing is not perfect, lead to maximum limit number of threads in the docker to system,

Suggest modify the way, your post processing, to send messages to the message system, handled by a message queue to process, realize the asynchronous mailing,

Or write to a database table, as the message queue, another thread timing query the database table, and send the email, this need not add message handling system
  • Related