Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Server not clearing tmp cache after server script execution? Bug?

Featured Replies

Hi guys,

 

I have noticed that Server Adv.12.03 not longer clears the temp cache once a server script is finished. Usually the cache should be deleted once the server script is done, shouldn't it.

It's happening on two Mac Servers 10.7.5 / 10.6.8

 

Has anyone else this problem? Is is a bug?

 

I love the temp cache. I use it a lot to get data from the internet into the database (Load, write to file in temp , import into database) using server scripts..

 

So if there a bug, I will run into trouble.. only a question of time and disc space..

 

Best,

Alexander

 

 

 

 

 

How do you establish that it does not?  What do you look at?

  • Author

How do you establish that it does not?  What do you look at?

 

I'm looking into the server's -TMP- folder located at  /private/var/folders/.../.../T/

And I can see all the XMLs downloaded by the server script there (one folder for each run) and a lot of extra FMTEMPFM....outtemp  files, I assume one for every XML import into the database.

 

But it's only happening with one script, another one doing quite the same job, the tmp is deleted as expected.

I also checked permissions.

 

Maybe I'll just reinstall the server software and see what happens then...

  • Author

So, I kept an eye on the servers for a few days and the contents of some (not all) temp folders is definitely not deleted after the server script is done.

 

If the temp folder contains FileMaker XML being stored there before import, the folders are deleted,

once a XSLT transformation is involved or XMLs are checked via xmlstarlet, the folders incl. their contents remains.

 

But this doesn't make any sense to me.

 

I also checked the permissions, they were correct. 

 

So I'm clueless and I will delete the files as soon as they are not longer needed, that's why I work with the temp folder... :mad:

How are you invoking xmlStarlet?  I'm thinking that there is something lingering when FM finishes the script that prevents FM from deleting the temp folder.

  • Author

Good idea,

xmlstarlet is invoked via ScriptMaster / RunShellScript (with timeout). The result is written to disk (same temp folder) by the shell script. The server script is kept in a loop checking for the result  of the shell script eventually with a timeout of 5 sec.

 

But it wouldn't explain the behavior for other script, this is just simple XML download/write to disk /import via XSLT.

 

I have notice that not all files downloaded (1500+ files) to the script's temp folder are still there and the ones being at the end on an alphanumerical sort. So I think FileMaker Server is deleting the files in the script's temp folder in alphanumericalical order but there seems to be a timeout. This also explains why there are theses .outtemp files in the parent folder.

So let's see what happens if I have the script's downloaded contents deleted beforehand.

  • Author

I had most of the files deleted and now everything is working as expected. This points to that there is some limitation either timing or file count.

As very rough figure I can tell from my "experiments"

1.000 files in the tmp folder seem to be ok.

But that's just some figure, no other factors as workload etc were taken into any consideration.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.