File Events on UNIX
File events allow you to raise events in Redwood Server as soon as a file arrives. The files must reside on a file system that the user who starts the network-processor
has access to. You specify a list of directories and file patterns, when a file matching the pattern is detected, the event is raised. You specify a move directory to clearly see which files have been detected. When you check the Check if file is in use property of a file event (default checked) Redwood Server takes file locking into account when working with files. In this case, a file event is only ever raised when the process that created the file has released the lock on the file. This allows big files to be picked up as soon as they are complete, so the entire file is processed.
Platform process servers that use file events require at least one of the following keys:
- ProcessServerService.External.limit - the total number of external process servers (Platform agents, distinct web service endpoints, and SAP connectors).
- ProcessServerService.OS.limit - the total number of platform agent process servers.
If you want to check if a file file.txt
is still locked, use fuser file.txt
, the output should be null. If you see the following, the file file.txt
is still locked, in this example, the file is locked by a process with a process ID of 123456
:
file.txt: 123456
note
You run fuser
without any arguments.
The time Redwood Server usually needs to raise an event once the lock has been released on a watched file should not exceed the Poll Interval plus 5 seconds. Heavy load on the platform agent can, however, increase this time somewhat. If you experience long delays and the file is not very big, you can uncheck Check if file is in use and see if this solves the problem. Note, however, that Redwood Server cannot determine if the file is complete in this case.