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

Can't view stats for a longish time range #4257

Open
2 tasks done
jonahgreenthal opened this issue Jun 21, 2024 · 2 comments
Open
2 tasks done

Can't view stats for a longish time range #4257

jonahgreenthal opened this issue Jun 21, 2024 · 2 comments
Assignees
Labels
self-hosting Anything self-hosted

Comments

@jonahgreenthal
Copy link

Past Issues Searched

  • I have searched open and closed issues to make sure that the bug has not yet been reported

Issue is a Bug Report

  • This is a bug report and not a feature request, nor asking for self-hosted support

Using official Plausible Cloud hosting or self-hosting?

Self-hosting

Describe the bug

When I try to view page stats for a time range longer than about six months, the page spins seemingly indefinitely (even overnight) without actually producing data.

This instance is self-hosted on a t2.micro EC2 instance. One possibility is that calculating the aggregation is too resource-intensive, though top shows that there is plenty of available memory (and even more available swap space). If that is the issue, though, there should at least be a reasonable error message, though realistically, I'd be comfortable waiting (just not indefinitely).

I would be happy to do additional work to try to narrow this down, troubleshoot, etc. However, I do not know anything about Plausible internals.

Expected behavior

The report for the indicated time range should load, preferably in a reasonable amount of time.

Screenshots

image

Environment

- OS: Windows 10
- Browser: Firefox
- Browser Version: 127.0
@jonahgreenthal jonahgreenthal changed the title Can't view stats for a long time range Can't view stats for a longisj time range Jun 21, 2024
@jonahgreenthal jonahgreenthal changed the title Can't view stats for a longisj time range Can't view stats for a longish time range Jun 21, 2024
@ruslandoga
Copy link
Contributor

ruslandoga commented Jun 21, 2024

👋 @jonahgreenthal

Thank you for the report!

According to the browser console the query times out after ten seconds.
You might get more info (which query, where in the code, etc.) from the server logs:

$ cd hosting # or wherever you cloned plausible/community-edition
$ docker compose logs

There are two possible improvements:

  • make timeout configurable or remove it completely in the community edition
  • show an error in UI and stop the spinning wheel

@jonahgreenthal
Copy link
Author

Thanks! Here's what I see in the logs:

plausible_plausible_events_db_1  | 2024.06.21 13:07:38.363143 [ 328 ] {58dfd4a2-fe00-4cec-a90c-90d9d45f3a49} <Error> DynamicQueryHandler: Cannot send exception to client: Code: 24. DB::Exception: Cannot write to ostream at offset 712. (CANNOT_WRITE_TO_OSTREAM), Stack trace (when copying this message, always include the lines below):
plausible_plausible_events_db_1  | 
plausible_plausible_events_db_1  | 0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xa3fb75a in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 1. DB::WriteBufferFromOStream::nextImpl() @ 0xa533d12 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 2. DB::WriteBufferFromHTTPServerResponse::nextImpl() @ 0x15cb32ec in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 3. DB::HTTPHandler::trySendExceptionToClient(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, DB::HTTPServerRequest&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&) @ 0x15c2f8bf in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 4. DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x15c30e84 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 5. DB::HTTPServerConnection::run() @ 0x15cabda2 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 6. Poco::Net::TCPServerConnection::start() @ 0x18a16b73 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 7. Poco::Net::TCPServerDispatcher::run() @ 0x18a17ecd in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 8. Poco::PooledThread::run() @ 0x18bda829 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 9. Poco::ThreadImpl::runnableEntry(void*) @ 0x18bd80e2 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 10. ? @ 0x73541dca5609 in ?
plausible_plausible_events_db_1  | 11. __clone @ 0x73541dbca133 in ?
plausible_plausible_events_db_1  |  (version 22.8.13.20 (official build))
plausible_plausible_events_db_1  | 2024.06.21 13:07:38.366146 [ 328 ] {} <Error> ServerErrorHandler: Poco::Exception. Code: 1000, e.code() = 32, I/O error: Broken pipe, Stack trace (when copying this message, always include the lines below):
plausible_plausible_events_db_1  | 
plausible_plausible_events_db_1  | 0. Poco::Net::SocketImpl::error(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x18a0f921 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 1. Poco::Net::SocketImpl::sendBytes(void const*, int, int) @ 0x18a11306 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 2. Poco::Net::StreamSocketImpl::sendBytes(void const*, int, int) @ 0x18a15a77 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 3. Poco::Net::HTTPSession::write(char const*, long) @ 0x189ef053 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 4. Poco::Net::HTTPChunkedStreamBuf::writeToDevice(char const*, long) @ 0x189d9715 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 5. Poco::BasicBufferedStreamBuf<char, std::__1::char_traits<char>, Poco::Net::HTTPBufferAllocator>::sync() @ 0x189da829 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 6. ? @ 0x189d992b in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 7. Poco::Net::HTTPChunkedOutputStream::~HTTPChunkedOutputStream() @ 0x189da4e2 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 8. DB::HTTPServerConnection::run() @ 0x15cabf33 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 9. Poco::Net::TCPServerConnection::start() @ 0x18a16b73 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 10. Poco::Net::TCPServerDispatcher::run() @ 0x18a17ecd in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 11. Poco::PooledThread::run() @ 0x18bda829 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 12. Poco::ThreadImpl::runnableEntry(void*) @ 0x18bd80e2 in /usr/bin/clickhouse
plausible_plausible_events_db_1  | 13. ? @ 0x73541dca5609 in ?
plausible_plausible_events_db_1  | 14. __clone @ 0x73541dbca133 in ?
plausible_plausible_events_db_1  |  (version 22.8.13.20 (official build))

Of the options you say, I'd definitely prefer one that lets me see the info rather than an error :-)

@ruslandoga ruslandoga added the self-hosting Anything self-hosted label Jun 22, 2024
@ruslandoga ruslandoga self-assigned this Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
self-hosting Anything self-hosted
Projects
None yet
Development

No branches or pull requests

2 participants