Skip to content

Is PHP7 release stable? #213

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

Closed
slawomir-pryczek opened this issue Feb 2, 2016 · 51 comments
Closed

Is PHP7 release stable? #213

slawomir-pryczek opened this issue Feb 2, 2016 · 51 comments

Comments

@slawomir-pryczek
Copy link

Hi Guys,
I tried to switch to php-memcached on a service where we have like 20-30k request/s and it seems that PHP7 memcached release is having some issues... basically when using persistent connection mode it segfaults like crazy. I tried to switch to normal connections but then other memcached clients using old library under php5.6 were having issues to connect (maybe connections are not fully closed?)

We also made a simple debugging script, on pconnect it segfaults and loose key values (even if key is in cache it randomly returns empty), on normal connect it's much slower than memcache and unstable... connect->set->get takes about 1-30 ms, on the old setup (memcache/php) extension it's preety constant at 1-4ms.

Up to some point it works ok (we build a cluster like setup where we can control traffic send to all nodes), but after traffic gets higher it starts to make issues.

Can this be somehow related to connection handling and are you aware of this issue?

@mkoppanen
Copy link
Member

Hello,

there is no release for PHP7 yet. I am currently working on resolving issues with PHP7 and cleaning up the code. Is the persistent connection issue easy to reproduce? I'll take a look as soon as possible

Thanks,
Mikko

@slawomir-pryczek
Copy link
Author

Aha, that's great i'll see about reproducing the issue and prepare some code

@slawomir-pryczek
Copy link
Author

Hi Mikko, we looked more into the issue...

Good thing is that the spike problem seems to be networking related. We have just installed php7/lighty on this server and it seems we have some switch problems. That's what was causing spikes in connection times... sorry for confusion.

Now for the segfault issues, we were able to eliminate it by switching to memcache (not d) module found here
https://github.com/websupport-sk/pecl-memcache/tree/NON_BLOCKING_IO_php7
Wasn't able to reproduce it in VM...

So the only thing i know for now ...

  1. Segfaults disappear after switching memcache_d_ to normal connections
  2. Segfaults also disappear after using memcache (without d) and persistent connections

If i'll find anything else that might help diagnosing issue - will post here.

Thanks.

@jonathanpmartins
Copy link

@mkoppanen Only waiting for stable release! My unit tests are passing!

@dzuelke
Copy link
Contributor

dzuelke commented Feb 5, 2016

Let me know if there's anything I can do to help with PHP 7, @mkoppanen !

@jonathanpmartins
Copy link

👍 ehehhe, oh, the waiting is killing me.

@mkoppanen
Copy link
Member

@dzuelke,

Reviewing #214 would be helpful. Also running your local test suites against that would be a huge help. Been fixing a lot of errors in the existing code and the diff just keeps growing.

Among other things we had six versions (copy-paste) of different set and get code.

@mkoppanen
Copy link
Member

@slawomir-pryczek,

with PR #214 I am unable to reproduce the persistent connection segfault. In my local environment persistent connections seem to work as expected and valgrind isn't complaining.

Can you try this branch and see if it solves your issues?

Thanks,
Mikko

@slawomir-pryczek
Copy link
Author

Hi Mikko, sorry for waiting, we were able to do some quick tests with recent code (i saw #214 is merged in php7 branch), with persistent connections - no longer segfaulting, so it seems fixed.

@ralfbecker
Copy link

Any news or timeline for a PHP7 supporting release?

@jonathanpmartins
Copy link

@ralfbecker You can compile it using the php7 branch. See my comment on this issue: #194 (comment)
But I think its not stable yet. Good that my basic unit tests are all passing! hehehee

@oerdnj
Copy link

oerdnj commented Mar 9, 2016

@mkoppanen JFTR I got one user reporting BC break in 3.0.0b1, but he refused to report it here and claims the BC break in 3.0.0b1 is deliberate. Are you aware of any BC breaks in 3.0.0b1 (latest git), I haven't found anything in the git log that would suggest so?

@mkoppanen
Copy link
Member

@oerdnj, there is an intentional backwards compatibility break with cas token parameter in certain calls.

@dzuelke
Copy link
Contributor

dzuelke commented Mar 9, 2016

Is that documented anywhere? Or a ticket for it?

@dzuelke
Copy link
Contributor

dzuelke commented Mar 9, 2016

Ah just saw, it's in package.xml only, not in ChangeLog.

Any plans for the 3.0.0a1 tag and PECL release? :)

@slashterix
Copy link

@mkoppanen what can I or my company do to help speed up the release of this? I understand you are a busy guy and thank you for all your work here. We are excitedly awaiting this package so we can start using php7 in production and would like to help any way we can.

@mkoppanen
Copy link
Member

@slashterix,

if you got time to write a bit better changelog based on the work on git commits. Especially detail the backwards compatibility break in cas params better (the reasoning). Other than that it's good to go.

@cyb3rd4d
Copy link

Hi!

Is there a release date for the PHP7 version?

Thank you

@solidspark
Copy link

We are eagerly awaiting this release. Let me know how we can assist.

@dzuelke
Copy link
Contributor

dzuelke commented Mar 22, 2016

Can you please merge #232 and the following PRs with docs @mkoppanen so I or others can continue work on the changelog?

@dzuelke
Copy link
Contributor

dzuelke commented Mar 30, 2016

I've been trying to take a stab at the changelog, @mkoppanen, but unfortunately, the most important changes are all part of one massive commit, a930b41, with no descriptive commit message or comments.

@matts2cant
Copy link

Bump, any news ?

@dictcp
Copy link
Contributor

dictcp commented Jun 8, 2016

one potential blocker to release is #250.
and there are PR #252 for it. hopefully it got reviewed and also got verified to fix #250 soon

@dmitriivoitovich
Copy link

dmitriivoitovich commented Jun 20, 2016

Hey guys! The #250 issue looks closed, so... any news about stable release with php7 support? Our OPS team refuse to install the unstable version nor any third party builds so we are kind of stuck with migration to php7 because of memcached extension.

@ralfbecker
Copy link

Same here, missing Memcached support stalls PHP 7 migration :(

@tvlooy
Copy link
Contributor

tvlooy commented Sep 2, 2016

is the release of the 7 version a time / money issue? It seems like a lot of people need this to migrate to 7, so if all these people would put some money in a jar we could pay someone to do the work. Is setting up a donation thing a good idea?

@sonyarianto
Copy link

or this because everybody should move to Redis? Oh nooo

@coleturner
Copy link

coleturner commented Sep 21, 2016

I've found the php-memcached package to return incorrect values for the wrong key when using get($key) and have since switched back to Memcache - not suitable for production environments.

@ficus
Copy link

ficus commented Sep 22, 2016

@colepatrickturner what build? Can you reproduce so as to open a ticket? Your comment is raining on my parade as is. Also, curious where does your php-memcache comes from? Port by kaltura?

@coleturner
Copy link

coleturner commented Sep 22, 2016

@ficus

php-memcached installed from apt-get

PHP (FPM) Version: 7.0.11-1+deb.sury.orgtrusty+1
Version: 3.0.0a1-13-g6ee96ca+2.2.0-4+donate.sury.org
trusty+3

What I experienced:
Retrieved key #1 (77 characters)
Received result from another key (< 12 characters)

I cross-checked this directly with the memcached daemon telnet localhost 11211 and found that it was php-memcached returning the wrong values. Switched to php-memcache (3.0.920160311.4991c2f-5+donate.sury.orgtrusty+1) because it works.

@oerdnj
Copy link

oerdnj commented Sep 23, 2016

@colepatrickturner The latest release in the PPA should be 3.0.0a1-57-g4fa2111+2.2.0-1 which is just four commits behind the php7 branch, so you should try to reproduce with at least that.

I have also just uploaded the currect php7 HEAD build, so even better try with 3.0.0a1-61-g583ecd6+2.2.0-1+deb.sury.org~trusty+1.

@coleturner
Copy link

@oerdnj the machine I'm using is amd64 which has failed builds for anything greater than 3.0.0a1-13. I'll see if I can reproduce it on another machine and then build from source to the latest version.

P.S. thank you for providing packages!

TysonAndre pushed a commit to TysonAndre/phan that referenced this issue Oct 20, 2016
TysonAndre pushed a commit to TysonAndre/phan that referenced this issue Oct 20, 2016
@thias
Copy link

thias commented Dec 21, 2016

Not to criticize or anything, but for having run both phpredis and this memcached extension in production with PHP 7.0 for some months, with a relatively simple SET/GET usage, both have their issues. In my opinion "switching to Redis" might not necessarily be the right solution, see phpredis/phpredis#429 - I have been bitten by that one, with some fairly nasty consequences.

Right now I'm still seeing some minor issues with the memcached extension, but at least the issues seem visible (PHP Warnings are triggered) and memcached scales much better than redis on a single system with simple SET/GET usage (Redis is single fork, single thread and easily saturated a single CPU core in my environment).

I'm hoping to have time to debug our issues soon, and report details here, but in the meantime it could be a nice thing to get a proper release of the current code on the php7 branch, maybe marked as beta for now.

@iBobik
Copy link

iBobik commented Dec 21, 2016 via email

@slawomir-pryczek
Copy link
Author

Hi Guys, I want to invite you to test my memcached - like server written in go available at:
https://github.com/slawomir-pryczek/FlatDB

Basically in my company we were using memcached modified by me for a long time (like 3-4 years), because of bugs with PHP7 (and also we need something a little different than memcached), i decided to write my own version... It's used in production for about 200 days without restart, it has much better GC, configurable auto-rebalance which is able to move items between slabs, snapshots, tcp optimizations for high MTU, optimizations for high number of CPU cores, etc.

It has native PHP client using TCP sockets, and the server works on TCP, UDP and HTTP. Easy to install using composer.

The new version has some nice features like sharding and replication for all operations. Sharding and replication is tested using phpunit tests, but not yet in production, we'll be testing that too, soon. If smoeone has any questions let me know.

@iBobik
Copy link

iBobik commented Dec 21, 2016

Comment of @slawomir-pryczek seems like a spam. (This project is PHP client for Mencached, not server.)

@jrchamp
Copy link

jrchamp commented Dec 21, 2016

@iBobik It looks like both a memcached replacement and a native PHP client for an in-memory key-value store. If it's spam then the redis conversation is too.

@slawomir-pryczek
Copy link
Author

@jrchamp yes thanks for the comment, the project is server and client. To help people that have issues with memcached and want to try something what is more like memcached than redis/mongo, and has all features which are missing from simplified memcache extension (which is very good but lacking some features like atomic ops with CAS), plus want good support for very dynamic data (different size, TTLs, etc.).

@iBobik You're here just to say "good idea" and link to your homepage... then, magically i'm "spamming" :) Uh, okay ;)

@oerdnj
Copy link

oerdnj commented Dec 22, 2016

Because he replied to the issue via email and now stop spamming this issue with other projects please.

@Intrepidity
Copy link

So, 5.6 officially loses support in 2 days, 7.0 has been out for 2 years, and still no stable version of this extension, nor any clear answers on what still needs to happen or how we can help? It's an OSS project after all. I'm more than willing to invest some time in getting this to a stable release.

@oerdnj
Copy link

oerdnj commented Dec 29, 2016

@Intrepidity What are you talking about? PHP 5.6 is security supported until 31 Dec 2018 (e.g. two more full years) and PHP 7.0 was initially released 1 year ago (not two).

@slawomir-pryczek
Copy link
Author

@Intrepidity I have recently spoken with a guy that wrote similar extension for his company as they were having issues with PHP7... you may give it a try, if you need memcached as he seemed very capable
https://github.com/cybozu/php-yrmcds/ so if you can't use that limited memcache extension i linked in 4th post that's probably way to go for now...

@ChazyTheBest
Copy link

So what is the reason for such delay?

@sodabrew
Copy link
Contributor

The 3.0.0 release will be released Real Soon Now. I'm cleaning up the tickets in preparation.

TysonAndre pushed a commit to TysonAndre/phan that referenced this issue Feb 2, 2017
omauger pushed a commit to alterway/docker-php that referenced this issue Mar 16, 2017
add php 7.0 & 7.1 version

Manque l'extension memcached, pas encore de release disponible pour php7, juste une branche sur github pour le moment.

Cf : 
php-memcached-dev/php-memcached#213
docker-library/php#317

Merci de review.

See merge request !14
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