-
Notifications
You must be signed in to change notification settings - Fork 134
Trying to run 2 PHP Daemons on the same box seems to create issues in msg q #51
Comments
There's another defect with this ftok code -- you cannot have workers that In the meantime, I think you could work around this by giving your daemons On Wed, May 28, 2014 at 1:18 PM, camtnbikerrwc [email protected]:
|
I changed names but that did not help since I think ftok uses inodes/fs. Since the ftok file is created in tmp and unlinked after the ftok call I seem to get the same id. For now I have replaced the sys_get_temp_dir with a getcwd, my service script always cd's the daemon home directory and this seems to have fixed the issue for now. At least I get 2 seperate Message Q's. Thanks for all the great work. I really appreciate it. I only have 1 Worker Per Seperate Daemon so I am not hitting that problem. I guess though I could have 2 Differetn Workers, interessting. ger From: Shane Harter [email protected] There's another defect with this ftok code -- you cannot have workers that In the meantime, I think you could work around this by giving your daemons On Wed, May 28, 2014 at 1:18 PM, camtnbikerrwc [email protected]:
|
See source for ftok. probably not a food idea to use an ephemeral file to be the input to ftok. Probably want a permanent file, I see that after you touch the file and ftok it you unlink it. best ger 35 key_t 36 ftok(path, id) 37 const char *path; 38 int id; 39 { 40 struct stat st; 41 42 if (stat(path, &st) < 0) 43 return (key_t)-1; 44 45 return (key_t) (id << 24 | (st.st_dev & 0xff) << 16 | (st.st_ino & 0xffff)); 46 } From: Shane Harter [email protected] There's another defect with this ftok code -- you cannot have workers that In the meantime, I think you could work around this by giving your daemons On Wed, May 28, 2014 at 1:18 PM, camtnbikerrwc [email protected]:
|
I have 2 Damons, for 2 differnet purposes.
From ObjectMediatior.php I see the ftok is always the same, this means they both seem to want to use the same msg_q
$tmp = sys_get_temp_dir();
$ftok = sprintf($tmp . '/%s_%s', str_replace('/', '_',
$this->daemon->get('filename')), $this->alias);
Am I missing something about configuring my env to allow multple seperate
Daemons run on the same box.
The text was updated successfully, but these errors were encountered: