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

"No such file or directory" error when reading free space information #98

Open
a1exsh opened this issue Feb 28, 2018 · 2 comments
Open

Comments

@a1exsh
Copy link
Member

a1exsh commented Feb 28, 2018

Just got this failure on v1.3.1. Was running fine for some minutes and then crashed:

02-28 15:12:52,312 Unable to read free space information for the pg_xlog and data directories for the directory             /home/postgres/pgdata/pgroot/data: [Errno 2] No such file or directory: '/home/postgres/pgdata/pgroot/data/pg_xlog/.wal-e/prefetch/running/000000010001EB100000008B'
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/pg_view/__init__.py", line 278, in main
    loop(collectors, consumer, groups, output_method)
  File "/usr/local/lib/python3.5/dist-packages/pg_view/__init__.py", line 90, in loop
    curses.wrapper(do_loop, groups, output_method, collectors, consumer)
  File "/usr/lib/python3.5/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/lib/python3.5/dist-packages/pg_view/__init__.py", line 142, in do_loop
    process_single_collector(st)
  File "/usr/local/lib/python3.5/dist-packages/pg_view/utils.py", line 84, in process_single_collector
    st.diff()
  File "/usr/local/lib/python3.5/dist-packages/pg_view/collectors/base_collector.py", line 761, in diff
    candidate = self._produce_diff_row(prev, cur)
  File "/usr/local/lib/python3.5/dist-packages/pg_view/collectors/base_collector.py", line 371, in _produce_diff_row
    None) is not None else None)
  File "/usr/local/lib/python3.5/dist-packages/pg_view/collectors/partition_collector.py", line 169, in calculate_time_until_full
    prev.get('path_size', 0) > 0 and
TypeError: unorderable types: NoneType() > int()

Looks like a race condition with listing directory contents and trying to get size information on individual files in the loop.

@tmotyl
Copy link

tmotyl commented Jul 16, 2021

I've got the same issue with v 1.4.1 on python 2.7

ERROR: 2021-07-16 16:54:58,137 Unable to read free space information for the pg_xlog and data directories for the directory             /var/lib/postgresql/11/main: [Errno 2] No such file or directory: '/var/lib/postgresql/11/main/pg_xlog/'

@tmotyl
Copy link

tmotyl commented Jul 16, 2021

duplicate? #82

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

2 participants