DEVONthink Server stops responding

I agree that’s ideal for debugging. As a matter of fact, the problem is 100% reliable: the when it occurs seems to vary from a day or two to four or five, but it always happens. Is there verbose logging I can enable? Other settings that can be toggled with the web server? Anything to evince where the problem is to get it fixed?

There are no additional options currently, the only real one would be to reproduce this (but we couldn’t so far). Or if you should ever exactly know when the issue happened we could check the last requests right before in the server’s log to figure out whether it’s related to a certain request, browser, platform etc. Might be also a bot scanning servers & ports, wouldn’t be the first time.

I guess that means I’m just hosed. I ponied up the funds for the server edition, and it doesn’t work reliably. Great. Thanks at least for the honesty. I love the product, and I find new ways to use it everyday, but macOS isn’t the only platform I have and need to work from. I’ll have to start looking around for another replacement.

According to your first post the stylesheet caused the issue, is this still true? Then a workaround would be to remove it again.

No, I only thought that was the cause because the problem began after I started using it. I’ve since removed it completely yet the problem remains.

I wonder whether it’s related to a certain action in the web interface or viewing/editing a certain document type. A plain browser without extensions would be also ideal to wipe out this factor.

A good point. I’ll start using Edge, which has no add-ons on any of my PCs as I never use the awful thing. I’ll see if that makes any difference.

I’m a bit late posting this, but the server stopped responding again two days ago after being in use for roughly 5 days and being accessed over the web only by Microsoft Edge with zero add-ons or other customizations in place. Looks like having a “plain browser” makes no difference.

Thanks for the update! But you don’t know the time by chance? See…

I don’t really have any easy way to know precisely when it stops responding. I first learn of it every time when I go to open a tab on my browser and get no response. So let me ask a couple of questions.

  1. Is there any way to detect that programmatically? Can I rely on hitting an endpoint with curl or some similar equivalent for Windows systems?
  2. As a potential workaround, is there any way programmatically to shut down DEVONthink and restart it safely and properly? I find I can write a script to end the process, but that doesn’t close the database properly. If I can write a script to shutdown the app every day and restart it properly, then that would at least let me keep working while I’m out of town.

Thanks in advance.

cron might be the way to go. It should be fairly easy to write an (Apple|Java)Script that closes all databases, shutsdown DT, starts it again and opens all databases. Your crontab entry would then just execute osascript -l JavaScript|AppleScript <filename> once a day at (for example) 2:11 am.

1 Like

Any advice how to do that? I’m familiar enough with cron from my developer days, but the very thing I don’t know is how to close the app safely and properly via (Apple|Java)Script.

I’ll try to hack something tomorrow.

1 Like

Even better. Many thanks! It doesn’t need to be perfect, just an example will do.

Actually a simple AppleScript instruction like `tell application id “DNtp” to quit should be sufficient

A beginning might be a copy of the server’s log plus…

  1. The time when you noticed the issue
  2. The time when you restarted the server or the app to fix the issue
  3. A list of browsers/platforms that are typically used to access the server

That way I might be able to check at least if there were any automatic/unusual requests.

Here’s what I propose as a JavaScript script to close all databases, terminate DT, restart it and then open all previously opened databases again:

(() => {
  const app = Application("DEVONthink 3");
 /* Get the paths of the currently open databases so we can re-open them later */
  const databasePaths = app.databases.path();
/* Close all databases */
  app.databases().forEach(db => app.close(db));
/* Quit the app and activate it again */
/* Open all previously open databases */
  databasePaths.forEach(db => app.openDatabase(db));

Save that in a file, for example /Users/you/restartDT.js. Than you can execute it with
osascript -l JavaScript /Users/you/restartDT.js
Add this command to the crontab of a user who’s permitted to terminate and restart DT server (possibly root, but since I don’t have the server edition, I wouldn’t know). Have it run every day (or every weekday) at a time when nobody is using DT.

Note: As an exemption from the rule, I actually kind of tested this script here, and it seems to do what it’s supposed to do. But since I have only the Pro edition, things might be different with the server.

Actually closing and opening the databases on your own shouldn’t be necessary. Telling DEVONthink via AppleScript/JXA to quit/activate is like manually quitting/launching it.

I’m one of the cautious guys. Also, I liked the idea to get all the paths and use them to reopen afterwards. What a pity to let that go to waste :wink:

Simply saving & loading a workspace would be another option in the script.