Stash icon indicating copy to clipboard operation
Stash copied to clipboard

Stash Issue with Concrete5?

Open madesimplemedia opened this issue 7 years ago • 4 comments

We use Concrete5 to build sites and it uses Stash. I've got an issue on a site where we have large strings in the cache file and I get errors like: "PHP Warning: Unterminated comment starting line 16 in /home/www4x90/public_html/application/files/cache/0fea6a13c52b4d47/25368f24b045ca84/38a865804f8fdcb6/57cd99682e939275/18e23c785c6a72cf/ca47fbe20fed45aa.php on line 16"

There is not an unterminated comment, the code is fine. I think the issue is that maybe the stash parser is not reading the entire file?

I've attached a problem php cache file. Is the file too long to be passed? Is there a fix? ca47fbe20fed45aa.txt

madesimplemedia avatar Dec 20 '17 09:12 madesimplemedia

Noone got any ideas on this? Could it be lack of available memory?

madesimplemedia avatar Jan 03 '18 14:01 madesimplemedia

Try switching to the SQLite backend. The filesystem one works great in testing but runs into various race conditions when put under load.

tedivm avatar Jan 03 '18 18:01 tedivm

@tedivm If u have problems with race condition try to use my snippet that i created for my session management

$resFile = fopen($this->strSessionPath . '/' . $strSessionId, 'rb');

if (flock($resFile, LOCK_SH))
{
	clearstatcache(true, $this->strSessionPath . '/' . $strSessionId);

	$strSessionData = fread($resFile, max(filesize($this->strSessionPath . '/' . $strSessionId), 1));

	flock($resFile, LOCK_UN);
}

benjaminfunk avatar Jan 04 '18 14:01 benjaminfunk

Thanks you for your replies, we're looking into what we can do/try in Concrete5.

madesimplemedia avatar Jan 05 '18 10:01 madesimplemedia