Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stash Issue with Concrete5? #374

Open
madesimplemedia opened this issue Dec 20, 2017 · 4 comments
Open

Stash Issue with Concrete5? #374

madesimplemedia opened this issue Dec 20, 2017 · 4 comments

Comments

@madesimplemedia
Copy link

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
Copy link
Author

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

@tedivm
Copy link
Member

tedivm commented Jan 3, 2018

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

@benjaminfunk
Copy link

@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);
}

@madesimplemedia
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants