https://discord.cloudflare.com logo
Join Discord
Powered by
# coding-help
  • e

    edward

    05/23/2023, 1:33 PM
    I have a worker that concatenates a few files from R2 to one response, if I have like 3-4 files or so it seems to work ok, but when I have more I get
    This WritableStream is currently locked to a writer
    Can't really find any support on this, and I obviously want to avoid having to await each write?
  • a

    albert

    05/23/2023, 2:17 PM
    You need to await each write since concatenation has to be done sequentially. If you could write in parallel, you'd end up with a garbled file.
  • e

    edward

    05/23/2023, 2:19 PM
    Thanks, makes sense. So that would mean I’d pay for the entire duration the client is connected?
  • a

    albert

    05/23/2023, 2:19 PM
    Only if you use Unbound.
  • a

    albert

    05/23/2023, 2:19 PM
    Bundled doesn't bill for duration.
  • e

    edward

    05/23/2023, 2:20 PM
    Thanks for the help! Will take a look
  • e

    edward

    05/23/2023, 2:39 PM
    You’re the best 🙏, it works and cpu-time is unaffected
  • i

    IdkWhatever69

    05/24/2023, 3:09 PM

    https://cdn.discordapp.com/attachments/779390076219686943/1110942956573175818/Screenshot_2023-05-24_at_8.20.14_PM.png▾

  • i

    IdkWhatever69

    05/24/2023, 3:09 PM
    cron triggers dont work
  • i

    IdkWhatever69

    05/24/2023, 3:09 PM
    am i doing something wrong?
  • i

    IdkWhatever69

    05/24/2023, 3:09 PM

    https://cdn.discordapp.com/attachments/846453104382836766/1110947784661680189/Screenshot_2023-05-24_at_8.png▾

  • k

    kian

    05/24/2023, 3:12 PM
    Cron schedules can take up to 15 minutes to start working, if that's a new one.
  • i

    IdkWhatever69

    05/24/2023, 3:13 PM
    its been 5 hours
  • i

    IdkWhatever69

    05/24/2023, 3:24 PM
    anyone?
  • i

    IdkWhatever69

    05/24/2023, 3:24 PM
    please help
  • m

    malisimo

    05/26/2023, 12:34 AM
    Does anyone know why of the workers I have a route with a enabled tag and the other one have no tag?
  • c

    Chaika

    05/26/2023, 12:36 AM
    because one's the default workers.dev route you can't delete, only disable, and the other one is a custom route you added that you can delete?
  • m

    malisimo

    05/26/2023, 12:36 AM
    Yes the one I added doesn't have any label but I the same time if I visit the URL I added it won't trigger the worker
  • c

    Chaika

    05/26/2023, 12:38 AM
    Is it going over an existing origin? If not, did you create a DNS Record for it? If you're using routes, and you don't have an existing website/origin at that hostname, you'll need to create an originless dns record. I would recommend using Worker Custom Domains though, if there is no existing origin. They take care of the dns record creation for you, issue you a cert, and just work
  • m

    malisimo

    05/26/2023, 12:40 AM
    I do have the origin and I own the domain. I'm trying to use the worker to do a couple of modifications before the requests makes it to my servers. I added the record and if I go to my domain workers page I can see the route from the worker there
  • c

    Chaika

    05/26/2023, 12:44 AM
    It may be worth noting: if your route is
    example.com/
    , it will only match requests with no path. You need to use
    example.com/*
    to match all paths. Otherwise, that's strange. You're watching tail and not seeing it be executed?
  • m

    malisimo

    05/26/2023, 12:55 AM
    So, I have two routes *.example.com/test2 and *.example.com/test2. when I go to those routes it will just open the website not executing the working. The worker is doing a new response with hello world so I'm expecting that if I go to those paths the regular website should not open
  • m

    malisimo

    05/26/2023, 12:56 AM
    lol found the problem...... so stupid. I had a extra . in the path
  • c

    Chaika

    05/26/2023, 12:59 AM
    well at least it was something simple
  • m

    malisimo

    05/26/2023, 1:01 AM
    I know, thanks for the quick responses.
  • l

    LeviW

    05/27/2023, 12:02 AM
    Has anyone successfully connected a Worker to AWS RDS using the new sockets? We have an internet-accessible PostgreSQL instance, however always end up with this error:
    Copy code
    kj/compat/http.c++:6628: error: Error in HttpClientAdapter connect(); kj::cp(ex) = kj/compat/tls.c++:215: failed: TLS peer's certificate is not trusted; reason = self signed certificate in certificate chain
    stack: 7ff745bc8abf 7ff745c0ca2d 0 0 0 0 0 0 0 0
    there was an error
    Error: Connection terminated unexpectedly
        at Connection.<anonymous> (index.js:10488:77)
        at Connection.g (index.js:2024:16)
        at emitNone (index.js:1918:13)
        at Connection.emit2 [as emit] (index.js:2132:11)
        at CloudflareSocket.<anonymous> (index.js:8188:16)
        at emitNone (index.js:1918:13)
        at CloudflareSocket.emit2 [as emit] (index.js:2132:11)
        at index.js:8061:18 {
      stack: Error: Connection terminated unexpectedly
        at C… emit] (index.js:2132:11)
        at index.js:8061:18,
      message: Connection terminated unexpectedly
  • Following the tutorial at https
    l

    LeviW

    05/27/2023, 12:03 AM
    Following the tutorial at https://developers.cloudflare.com/workers/databases/connect-to-postgres/ we've tried passing
    ssl: { rejectUnauthorized: false },
    to the
    pg
    Client constructor but that seems to have no effect.
    v
    c
    • 3
    • 8
  • p

    piko

    05/28/2023, 5:16 AM
    How to ALTER column type?
    ALTER TABLE SUBS ALTER COLUMN ID TYPE TEXT;
    this code return
    near "ALTER": syntax error
    not working
  • c

    Cyb3r-Jok3

    05/28/2023, 8:41 PM
    I don't believe sqlite supports changing the column type
  • Cloudflare Worker TypeError: One-time-us...
    s

    sxuereb_gitlab

    12/28/2023, 12:51 PM
    What is strange is that the backend server (
    gdk.test:3000
    ) is getting the POST request just fine
    • 1
    • 2