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

Redis Collections Not release #612

Closed
quicksandznzn opened this issue May 20, 2024 · 10 comments · Fixed by #613
Closed

Redis Collections Not release #612

quicksandznzn opened this issue May 20, 2024 · 10 comments · Fixed by #613

Comments

@quicksandznzn
Copy link

when i use redis pipeline function, this code pipeLine.connection_pool.get_connection('') will make new connection, but not release

i change the code to str(pipeLine) it's ok

my code


redis_client = redis.Redis(host='127.0.0.1', port=6379,password='123456', db=0)
pipe = redis_client.pipeline(transaction=True)
pipe.get('test_key')
values = pipe.execute()
@eeliu
Copy link
Collaborator

eeliu commented May 20, 2024

@quicksandznzn

Thanks your report, we will check this problem.

eeliu added a commit to eeliu/pinpoint-c-agent that referenced this issue May 20, 2024
- fix: Redis Collections Not release pinpoint-apm#612
@eeliu eeliu mentioned this issue May 20, 2024
4 tasks
eeliu added a commit that referenced this issue May 20, 2024
- fix: Redis Collections Not release #612
@quicksandznzn
Copy link
Author

When will pinpointPy 1.2.1 be released? @eeliu

@eeliu
Copy link
Collaborator

eeliu commented May 21, 2024

@quicksandznzn

Can you help us test it ?

pip install -i https://test.pypi.org/simple/ pinpointPy==1.3.3

@quicksandznzn
Copy link
Author

quicksandznzn commented May 21, 2024

@quicksandznzn

Can you help us test it ?

pip install -i https://test.pypi.org/simple/ pinpointPy==1.3.3

pipeLine.connection is none , because pipeline.execute function will releases the connection

https://github.com/redis/redis-py/blob/de8b5709a7d2022deff55034fe7dabc5770225a2/redis/client.py#L1529

maybe use this code
str(pipeLine.connection_pool)
or
str(pipeLine.connection_pool._available_connections[0])

@quicksandznzn
Copy link
Author

quicksandznzn commented May 21, 2024

@quicksandznzn
Can you help us test it ?
pip install -i https://test.pypi.org/simple/ pinpointPy==1.3.3

pipeLine.connection is none , because pipeline.execute function will releases the connection

https://github.com/redis/redis-py/blob/de8b5709a7d2022deff55034fe7dabc5770225a2/redis/client.py#L1529

maybe use this code str(pipeLine.connection_pool) or str(pipeLine.connection_pool._available_connections[0])

i think str(pipeLine.connection_pool) is good for me

debug log is
add clue key:dst value:ConnectionPool<Connection<host=127.0.0.1,port=6379,db=0>>

@eeliu

@eeliu
Copy link
Collaborator

eeliu commented May 21, 2024

Thanks again, I will dig the source code more deep.

@quicksandznzn
Copy link
Author

Thanks again, I will dig the source code more deep.

Please @ me, if you have any progress .

@eeliu
Copy link
Collaborator

eeliu commented May 22, 2024

@quicksandznzn

please check this #617

@eeliu
Copy link
Collaborator

eeliu commented May 22, 2024

@quicksandznzn

@quicksandznzn

please check this #617

Test version released

pip install -i https://test.pypi.org/simple/ pinpointPy==1.3.4

@eeliu
Copy link
Collaborator

eeliu commented May 24, 2024

Released

pip install pinpointPy==1.2.1

eeliu added a commit to eeliu/pinpoint-c-agent that referenced this issue Jul 9, 2024
* support windows python (pinpoint-apm#592)

* feat(id): support unique id

- unique id in ms
- refactor common library
- remove dependence from shm
- php-agent 0.5.0
- python-agent v1.2.1

* feat(win32): support win32

- python-agent
- common library
- refactor common library
- fix bug when pooling
- cibuildwheel
- code style
- fix bug in endTrace

* fix bug in thread mode

* remove ambiguous API

* pipy 1.2.4 release test

* test char encoding

* fix bug in python

* hello packet, avoiding conflict

* fix bug in flask

* fix convert problem

* delete 'import MySQLdb' (pinpoint-apm#593)

Co-authored-by: eeliu <[email protected]>

* fix wheels bug

* intro docs

* feat:grpc-python (pinpoint-apm#588)

- api and example

* add docs for grpc

* Bump pymongo from 4.6.0 to 4.6.3 in /plugins/PY (pinpoint-apm#594)

Bumps [pymongo](https://github.com/mongodb/mongo-python-driver) from 4.6.0 to 4.6.3.
- [Release notes](https://github.com/mongodb/mongo-python-driver/releases)
- [Changelog](https://github.com/mongodb/mongo-python-driver/blob/master/doc/changelog.rst)
- [Commits](mongodb/mongo-python-driver@4.6.0...4.6.3)

---
updated-dependencies:
- dependency-name: pymongo
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(agent): sql v3 support (pinpoint-apm#595)

* feat(agent): sql v3 support

- remove metadata.go

* fix build script

* modify docs

* feat(py): PostgreSql (pinpoint-apm#599)

- psycopg2
- version :1.2.1

* fix import error

> PsycopgPlugins should follow the psycopg2

* feat(php): simple-php (pinpoint-apm#600)

- example for php

> hopes to help  pinpoint-apm#596

* fix(agent): status_code (pinpoint-apm#603)

- treats >=400  as an error

>pinpoint-apm#602

* correct the message format

* support collector-agent on Arm (pinpoint-apm#605)

* add arm

> pinpoint-apm#604

* docs(py): Guide for exclude url (pinpoint-apm#610)

> user path route

pinpoint-apm#609

* fix(py): redis plugin (pinpoint-apm#613)

- fix: Redis Collections Not release pinpoint-apm#612

* fix ci failed

- docs: python plugins

* --- (pinpoint-apm#616)

updated-dependencies:
- dependency-name: pymysql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* --- (pinpoint-apm#615)

updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(py): fix redis connection (pinpoint-apm#617)

- use format_host
* add default value

* update test pinpointpy 1.3.4

* feat(collector-agent): error (pinpoint-apm#608)

- error analysis
- common,collector-agent  `EXP_V2`
- python new api `add_exception`

* Bump fastapi from 0.104.1 to 0.109.1 in /plugins/PY (pinpoint-apm#614)

Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.104.1 to 0.109.1.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](fastapi/fastapi@0.104.1...0.109.1)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: eeliu <[email protected]>

* --- (pinpoint-apm#618)

updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: eeliu <[email protected]>

* Bump pymysql from 1.1.0 to 1.1.1 in /testapps/PY (pinpoint-apm#619)

Bumps [pymysql](https://github.com/PyMySQL/PyMySQL) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/PyMySQL/PyMySQL/releases)
- [Changelog](https://github.com/PyMySQL/PyMySQL/blob/main/CHANGELOG.md)
- [Commits](PyMySQL/PyMySQL@v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: pymysql
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: eeliu <[email protected]>

* build(go): go install (pinpoint-apm#622)

- support `go install`

* update for collector-agent

* fix(py): unwanted trace_id (pinpoint-apm#627)

- fix collector-agent compiled problem
- patch for pinpoint-apm#626

* support c level plugin in php (pinpoint-apm#623)

* test c-level plugins

* test pinpoint_join_cut

* use zend_string_release

- fix bug in pinpoint_interceptor_handler_entry

* add try_end

* test pinpoint_join_cut

* test pdo

* ci(versions): test php versions (#63)

- covered all phpt by docker compose
- pdo,redis,curl
- fix CI

* remote php5 support

* support ci for php7

* add php8.0 testCI

* add php8.3

* rename internal API

- pinpoint_start_trace => _pinpoint_start_trace

* update pinpoint_php module version

* add testcase for simplephp

* update docs

* Feat join cut get caller (#64)

* feat(php): pinpoint_get_caller_arg
* pinpoint_get_caller_arg and phpt
* update pinpoint_php module version 0.5.2
* - remove `fastapi==0.109.1` , it crashes CI
* simple_php for curl/redis/memcache/mysql

* test pack_php_module

* test wordpress

* enable logger

* test phpmyadmin

* fix phpmyadmin

* test(php): more popular project (#65)

- php wordpress, phpmyadmin
- java_call_app

* fix simplephp

* for wilderness test

* change package naming

* update docs

* fix extends bug in pinpoint-php

* support flarum

* support cachethq

* update docs

* update CN docs

* PHP DOC KR version update (pinpoint-apm#638)

* update docs

* update script for pinpoint_php (pinpoint-apm#639)

* fix version problem

* fix(php): yii2

- fix pinpoint-apm#640 yii2 plugins

* fix docs

* script for automatically uploading assert

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: mayingping-Bella <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Evelyn0927 <[email protected]>
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

Successfully merging a pull request may close this issue.

2 participants