- [x] Quickly analyze logs again to determine if any new ones have appeared (quick glance, there *is* at least one new one. check them all again
- [x] Triage list of unique errors:
  - [-] SYSTEM: ERROR: Aborting due to unrecoverable error: Error code: 336151576(0x14094418), ERROR: SSL_accept, code: 336151576, reason: ssl3_read_bytes:tlsv1 alert unknown ca # intermediate certificate incorrect, try switching to self signed cert? This is so sporadic, I'm not sure it's worth the effort to research further at this point. will contine to monitor
  - [x] SYSTEM: ERROR: Error: Error code: 336130315(0x1408F10B), ERROR: SSL_accept, code: 336130315, reason: ssl3_get_record:wrong version number # caused by connecting with too low SSL version or no TLS at all
  - [-] SYSTEM: ERROR: Error: Error code: 336151570(0x14094412), ERROR: SSL_accept, code: 336151570, reason: ssl3_read_bytes:sslv3 alert bad certificate # server demands client authenticate with a certificate, but client did not; or could be serverside ssl cert issue; or cert not created correctly. could this be from when my cert expired? will contine to monitor
  - [-] SYSTEM: ERROR: Error: Error code: 336191759(0x1409E10F), ERROR: SSL_write, code: 336191759, reason: ssl3_write_bytes:bad length # all I could find on this was bad data can cause it, no specifics on what constitutes "bad data" in this context. hopefully mitigated in this release, will continue to monitor
  - [-] SYSTEM: ERROR: Error: Error code: 5(0x5), ERROR: SSL_accept, code: 5, reason: DH lib # one source (stack overflow) says this is improper error handling, but that is all in the dependency. will continue to monitor. update: code comments in SocketServer say that this can happen when trying to connect too many times in rapid succession
  - [-] SYSTEM: ERROR: Error: Error code: 5(0x5), ERROR: SSL_read, code: 5, reason: DH lib # caused by concurrent connections, wrong client ssl version, or cert claim invalid, keep an eye on this around when cert expires next. will continue to monitor
  - [x] SYSTEM: ERROR: Error: Error code: 5(0x5), ERROR: SSL_write, code: 5, reason: DH lib # Diffie-Helman cypher issues? defering to future state as this may already be planned to be covered there? was able to sporadically reproduce using gemini-diagnostics tool, and so fixed it in this release
  - [x] SYSTEM: ERROR: Error: Error code: 6(0x6), ERROR: SSL_write, code: 6, reason: EVP lib # one source says the connection may be torn down before ssl_shutdown is made. reproduced sporadically with the TLSVerified check in gemini-diagnostics
- [-] After fixing these, the unexpected log files should no longer happen. Re-run the test scenario listed here: # After debugging, this appears related to Log.swift:124-129, where the logs get written to disk. Running the gemini server stress test against localhost while modifying the Log code to write the error in the `catch` statement in the lines listed above and to prefix a "CAUGHT ERROR" message, did not result in any logs with a "CAUGHT ERROR" message, but it did result in these unexpected file names. These files happened at the exact time that I was restarting the server due to the stress test forcing it to shut itself down, which smolver does intentionally (for now) in some error scenarios. Given this, and the fact that the logs are written to the file atomically, I can only assume that these files are tmp files created by the file writing API, and the log is happening right around the same time the server is shutting itself down, and so the file APIs never have a chance to remove the tmp file. Revisit this after fixing the intentional shutdowns to gracefully close the socket connection instead. They should be gone once all the SSL reboots are fixed. If not, will need to keep digging. As this release does not address *all* of the SSL reboots, just most of them, this problem is still happening, as expected.
- [x] When deploying this, move existing server logs to new subdir so that you can monitor new logs for improvements. There should be fewer app restarts after this release.