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

Writing data with Sync API fails silently #579

Open
francotiveron opened this issue Sep 22, 2023 · 2 comments
Open

Writing data with Sync API fails silently #579

francotiveron opened this issue Sep 22, 2023 · 2 comments

Comments

@francotiveron
Copy link

francotiveron commented Sep 22, 2023

I am using the following F# code to write

let write org bucket (callback: SeriesWriteEvent -> unit) (options: WriteOptions) (points: PointData array) = 
    log.Information("Writing {0} points in bucket {Organization}/{Bucket}", points.Length, org, bucket)
    use wApi = client.GetWriteApi(options)

    use _ = wApi.EventHandler |> Event.subscribe (fun (ea: EventArgs) ->
        match ea with
        | :? WriteSuccessEvent as ea -> BatchWritten options.BatchSize
        | :? WriteErrorEvent as ea -> BatchError ea.Exception
        | :? WriteRetriableErrorEvent as ea -> BatchRetry (ea.Exception, options.BatchSize, ea.RetryInterval)
        | :? WriteRuntimeExceptionEvent as ea -> BatchError ea.Exception
        |> callback)

    try
        wApi.WritePoints(points, bucket, org) 
    with | x -> log.Error(x, "Write Error")

The writing starts as expected. But, after a partial number of points is written (I am writing for example 200000 of the 1.5 million), the function returns without any error. The WriteSuccessEvent is called for 10 to 20 batches and then stops for a few seconds, and finally wApi.WritePoints simply returns without triggering any event (Retry or Error) nor throwing an exception.

@powersj
Copy link
Contributor

powersj commented Sep 26, 2023

wApi.WritePoints simply returns without triggering any event (Retry or Error) nor throwing an exception.

Can you clarify what you think is happening. You said it fails silently in the title. Are you not seeing all data in influxdb? If you are running a local influxdb, do you see any errors in the logs?

If you do a packet capture do you see all the batches or any errors?

Thanks!

@francotiveron
Copy link
Author

@powersj When I write "after a partial number of points is written" I mean that not all data are in influxdb after the end.
Influxdb is running in an AKS container, logs do not show anything strange, neither does the _monitoring bucket.

No Idea what packet capture is.

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