ahoward / lockfile

a ruby library for creating NFS safe lockfiles
55 stars 19 forks source link

Don't use the seed in the .lck filename #7

Closed weiser closed 7 years ago

weiser commented 11 years ago

We were experiencing errors that looked like:

File name too long -
/var/www/vhosts/silo/releases/20131002182809/tmp/dynamic_proxies/.silo-work29_8354_resque-1.19.0:
Waiting for
realtime_alf_serp_collector,high_priority_event_publisher,high_priority,realtime_alf_poster,normal_historical_rankings_collector,serp_deindexer,document_indexer,serp_churn_scrapeable_1380840273_497203_1335935188.lck

The cause of this is the seed. Since the .lck file already has the PID in it, adding the seed does not add to the "uniqueness" of the filename, but is adding to the length of the filename (which is causing us issues).

mikisvaz commented 10 years ago

I'd imagine that in a NFS share several locks could have the same PID even if they come from different processes when these are running in different machines.

weiser commented 7 years ago

stale